mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-19 00:39:15 +00:00
test(backups): display errors from api
This commit is contained in:
parent
cfda6b0810
commit
de1cbcb1ca
|
@ -42,6 +42,10 @@ def api_backup(authorized_client, service):
|
||||||
def get_data(response):
|
def get_data(response):
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
response = response.json()
|
response = response.json()
|
||||||
|
if (
|
||||||
|
"errors" in response.keys()
|
||||||
|
): # convenience for debugging, this will display error
|
||||||
|
assert response["errors"] == []
|
||||||
assert response["data"] is not None
|
assert response["data"] is not None
|
||||||
data = response["data"]
|
data = response["data"]
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in a new issue