test(backups): test dummy service compliance

This commit is contained in:
Houkime 2023-06-14 12:08:07 +00:00
parent 21791f20a2
commit 92322d8fad

View file

@ -1,6 +1,8 @@
from tests.test_graphql.test_backup import dummy_service, backups, raw_dummy_service from tests.test_graphql.test_backup import dummy_service, backups, raw_dummy_service
from tests.common import generate_backup_query from tests.common import generate_backup_query
from selfprivacy_api.graphql.common_types.service import service_to_graphql_service
from selfprivacy_api.jobs import Jobs, JobStatus from selfprivacy_api.jobs import Jobs, JobStatus
API_SNAPSHOTS_QUERY = """ API_SNAPSHOTS_QUERY = """
@ -62,6 +64,11 @@ def api_snapshots(authorized_client):
return result return result
def test_dummy_service_convertible_to_gql(dummy_service):
gql_service = service_to_graphql_service(dummy_service)
assert gql_service is not None
def test_snapshots_empty(authorized_client, dummy_service): def test_snapshots_empty(authorized_client, dummy_service):
snaps = api_snapshots(authorized_client) snaps = api_snapshots(authorized_client)
assert snaps == [] assert snaps == []