Fixed admin_request bug

This commit is contained in:
Ken Tsang
2017-08-10 12:47:57 +01:00
parent 468048797a
commit d5b91f9911

View File

@@ -1051,11 +1051,15 @@ def admin_request(client):
data=json.dumps(_data),
headers=[('Content-Type', 'application/json'), create_authorization_header()]
)
<<<<<<< HEAD
<<<<<<< HEAD
json_resp = json.loads(resp.get_data(as_text=True))
assert resp.status_code == _expected_status, json_resp
=======
if resp.get_data:
=======
if resp.get_data():
>>>>>>> Fixed admin_request bug
json_resp = json.loads(resp.get_data(as_text=True))
else:
json_resp = None