Flask Request.json() is deprecated, use get_json() instead.
See http://flask.pocoo.org/docs/0.12/api/#flask.Request.json
This commit is contained in:
parent
3e67db50f0
commit
6f16e20bf6
@ -456,12 +456,13 @@ class AbstractPillarTest(TestMinimal):
|
|||||||
expected_status, resp.status_code, resp.data
|
expected_status, resp.status_code, resp.data
|
||||||
))
|
))
|
||||||
|
|
||||||
def json():
|
def get_json():
|
||||||
if resp.mimetype != 'application/json':
|
if resp.mimetype != 'application/json':
|
||||||
raise TypeError('Unable to load JSON from mimetype %r' % resp.mimetype)
|
raise TypeError('Unable to load JSON from mimetype %r' % resp.mimetype)
|
||||||
return mod_json.loads(resp.data)
|
return mod_json.loads(resp.data)
|
||||||
|
|
||||||
resp.json = json
|
resp.json = get_json
|
||||||
|
resp.get_json = get_json
|
||||||
|
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user