From cf2dc6795a8d3258fc1e1981e7afc68d27673ac7 Mon Sep 17 00:00:00 2001 From: Houkime <> Date: Wed, 14 Jun 2023 12:41:45 +0000 Subject: [PATCH] test(backups): use get_data --- tests/test_graphql/test_api_backup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_graphql/test_api_backup.py b/tests/test_graphql/test_api_backup.py index 4c13398..7de6401 100644 --- a/tests/test_graphql/test_api_backup.py +++ b/tests/test_graphql/test_api_backup.py @@ -37,7 +37,7 @@ def api_backup(authorized_client, service): "query": API_BACK_UP_MUTATION, "variables": {"service_id": service.get_id()}, }, - ).json() + ) return response @@ -76,8 +76,9 @@ def test_snapshots_empty(authorized_client, dummy_service): def test_start_backup(authorized_client, dummy_service): response = api_backup(authorized_client, dummy_service) - assert response["data"]["startBackup"]["success"] is True - job = response["data"]["startBackup"]["job"] + data = get_data(response)["startBackup"] + assert data["success"] is True + job = data["job"] assert Jobs.get_job(job["uid"]).status == JobStatus.FINISHED snaps = api_snapshots(authorized_client)