From 1a65545c290ab50c8106a8316e6997ca1ff33c4f Mon Sep 17 00:00:00 2001 From: Houkime <> Date: Mon, 4 Dec 2023 15:35:50 +0000 Subject: [PATCH] test(backups, token_repo): move non-graphql tests out of graphql --- tests/{test_graphql => }/test_backup.py | 0 tests/test_graphql/test_api_backup.py | 4 ++-- tests/test_graphql/test_services.py | 2 +- tests/{test_graphql => }/test_localsecret.py | 0 .../test_repository/test_json_tokens_repository.py | 0 .../test_json_tokens_repository/empty_keys.json | 9 +++++++++ .../test_json_tokens_repository/null_keys.json | 0 .../test_json_tokens_repository/tokens.json | 0 .../test_repository/test_tokens_repository.py | 0 .../test_tokens_repository/empty_keys.json | 9 +++++++++ .../test_tokens_repository/null_keys.json | 0 .../test_repository/test_tokens_repository/tokens.json | 0 12 files changed, 21 insertions(+), 3 deletions(-) rename tests/{test_graphql => }/test_backup.py (100%) rename tests/{test_graphql => }/test_localsecret.py (100%) rename tests/{test_graphql => }/test_repository/test_json_tokens_repository.py (100%) create mode 100644 tests/test_repository/test_json_tokens_repository/empty_keys.json rename tests/{test_graphql => }/test_repository/test_json_tokens_repository/null_keys.json (100%) rename tests/{test_graphql => }/test_repository/test_json_tokens_repository/tokens.json (100%) rename tests/{test_graphql => }/test_repository/test_tokens_repository.py (100%) create mode 100644 tests/test_repository/test_tokens_repository/empty_keys.json rename tests/{test_graphql => }/test_repository/test_tokens_repository/null_keys.json (100%) rename tests/{test_graphql => }/test_repository/test_tokens_repository/tokens.json (100%) diff --git a/tests/test_graphql/test_backup.py b/tests/test_backup.py similarity index 100% rename from tests/test_graphql/test_backup.py rename to tests/test_backup.py diff --git a/tests/test_graphql/test_api_backup.py b/tests/test_graphql/test_api_backup.py index bc4b7f1..50d65d8 100644 --- a/tests/test_graphql/test_api_backup.py +++ b/tests/test_graphql/test_api_backup.py @@ -1,6 +1,6 @@ from os import path -from tests.test_graphql.test_backup import backups -from tests.test_graphql.test_backup import raw_dummy_service, dummy_service +from tests.test_backup import backups +from tests.test_common import raw_dummy_service, dummy_service from tests.common import generate_backup_query diff --git a/tests/test_graphql/test_services.py b/tests/test_graphql/test_services.py index e46ea33..aa8d2f3 100644 --- a/tests/test_graphql/test_services.py +++ b/tests/test_graphql/test_services.py @@ -10,7 +10,7 @@ from selfprivacy_api.utils.block_devices import BlockDevices import tests.test_graphql.test_api_backup from tests.test_common import raw_dummy_service, dummy_service from tests.common import generate_service_query -from tests.test_graphql.common import assert_ok, get_data +from tests.test_graphql.test_api_backup import assert_ok, get_data @pytest.fixture() diff --git a/tests/test_graphql/test_localsecret.py b/tests/test_localsecret.py similarity index 100% rename from tests/test_graphql/test_localsecret.py rename to tests/test_localsecret.py diff --git a/tests/test_graphql/test_repository/test_json_tokens_repository.py b/tests/test_repository/test_json_tokens_repository.py similarity index 100% rename from tests/test_graphql/test_repository/test_json_tokens_repository.py rename to tests/test_repository/test_json_tokens_repository.py diff --git a/tests/test_repository/test_json_tokens_repository/empty_keys.json b/tests/test_repository/test_json_tokens_repository/empty_keys.json new file mode 100644 index 0000000..2131ddf --- /dev/null +++ b/tests/test_repository/test_json_tokens_repository/empty_keys.json @@ -0,0 +1,9 @@ +{ + "tokens": [ + { + "token": "KG9ni-B-CMPk327Zv1qC7YBQaUGaBUcgdkvMvQ2atFI", + "name": "primary_token", + "date": "2022-07-15 17:41:31.675698" + } + ] +} diff --git a/tests/test_graphql/test_repository/test_json_tokens_repository/null_keys.json b/tests/test_repository/test_json_tokens_repository/null_keys.json similarity index 100% rename from tests/test_graphql/test_repository/test_json_tokens_repository/null_keys.json rename to tests/test_repository/test_json_tokens_repository/null_keys.json diff --git a/tests/test_graphql/test_repository/test_json_tokens_repository/tokens.json b/tests/test_repository/test_json_tokens_repository/tokens.json similarity index 100% rename from tests/test_graphql/test_repository/test_json_tokens_repository/tokens.json rename to tests/test_repository/test_json_tokens_repository/tokens.json diff --git a/tests/test_graphql/test_repository/test_tokens_repository.py b/tests/test_repository/test_tokens_repository.py similarity index 100% rename from tests/test_graphql/test_repository/test_tokens_repository.py rename to tests/test_repository/test_tokens_repository.py diff --git a/tests/test_repository/test_tokens_repository/empty_keys.json b/tests/test_repository/test_tokens_repository/empty_keys.json new file mode 100644 index 0000000..2131ddf --- /dev/null +++ b/tests/test_repository/test_tokens_repository/empty_keys.json @@ -0,0 +1,9 @@ +{ + "tokens": [ + { + "token": "KG9ni-B-CMPk327Zv1qC7YBQaUGaBUcgdkvMvQ2atFI", + "name": "primary_token", + "date": "2022-07-15 17:41:31.675698" + } + ] +} diff --git a/tests/test_graphql/test_repository/test_tokens_repository/null_keys.json b/tests/test_repository/test_tokens_repository/null_keys.json similarity index 100% rename from tests/test_graphql/test_repository/test_tokens_repository/null_keys.json rename to tests/test_repository/test_tokens_repository/null_keys.json diff --git a/tests/test_graphql/test_repository/test_tokens_repository/tokens.json b/tests/test_repository/test_tokens_repository/tokens.json similarity index 100% rename from tests/test_graphql/test_repository/test_tokens_repository/tokens.json rename to tests/test_repository/test_tokens_repository/tokens.json