From f02e27cf068f00fdb46fa4aa5f88de1fef1ae652 Mon Sep 17 00:00:00 2001 From: Houkime <> Date: Fri, 16 Jun 2023 15:19:22 +0000 Subject: [PATCH] test(backups): add a backend json reset test --- tests/test_graphql/test_backup.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/test_graphql/test_backup.py b/tests/test_graphql/test_backup.py index a70cdb8..645b2fa 100644 --- a/tests/test_graphql/test_backup.py +++ b/tests/test_graphql/test_backup.py @@ -108,11 +108,31 @@ def test_config_load(generic_userdata): assert isinstance(provider, Backblaze) assert provider.login == "ID" assert provider.key == "KEY" + assert provider.location == "selfprivacy" assert provider.backuper.account == "ID" assert provider.backuper.key == "KEY" +def test_json_reset(generic_userdata): + Backups.reset(reset_json=False) + provider = Backups.provider() + assert provider is not None + assert isinstance(provider, Backblaze) + assert provider.login == "ID" + assert provider.key == "KEY" + assert provider.location == "selfprivacy" + + Backups.reset() + provider = Backups.provider() + assert provider is not None + assert isinstance(provider, Backblaze) + assert provider.login == "" + assert provider.key == "" + assert provider.location == "" + assert provider.repo_id == "" + + def test_select_backend(): provider = providers.get_provider(BackupProvider.BACKBLAZE) assert provider is not None