mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-19 00:39:15 +00:00
test(backups): use get_data
This commit is contained in:
parent
a486825a4f
commit
cf2dc6795a
|
@ -37,7 +37,7 @@ def api_backup(authorized_client, service):
|
||||||
"query": API_BACK_UP_MUTATION,
|
"query": API_BACK_UP_MUTATION,
|
||||||
"variables": {"service_id": service.get_id()},
|
"variables": {"service_id": service.get_id()},
|
||||||
},
|
},
|
||||||
).json()
|
)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,8 +76,9 @@ def test_snapshots_empty(authorized_client, dummy_service):
|
||||||
|
|
||||||
def test_start_backup(authorized_client, dummy_service):
|
def test_start_backup(authorized_client, dummy_service):
|
||||||
response = api_backup(authorized_client, dummy_service)
|
response = api_backup(authorized_client, dummy_service)
|
||||||
assert response["data"]["startBackup"]["success"] is True
|
data = get_data(response)["startBackup"]
|
||||||
job = response["data"]["startBackup"]["job"]
|
assert data["success"] is True
|
||||||
|
job = data["job"]
|
||||||
|
|
||||||
assert Jobs.get_job(job["uid"]).status == JobStatus.FINISHED
|
assert Jobs.get_job(job["uid"]).status == JobStatus.FINISHED
|
||||||
snaps = api_snapshots(authorized_client)
|
snaps = api_snapshots(authorized_client)
|
||||||
|
|
Loading…
Reference in a new issue