From d7f96a9adfb0c71e092c542deee4e152dace6f90 Mon Sep 17 00:00:00 2001 From: Houkime <> Date: Mon, 20 Feb 2023 11:50:52 +0000 Subject: [PATCH] test(backups): basic file backend init test --- tests/test_graphql/test_backup.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_graphql/test_backup.py b/tests/test_graphql/test_backup.py index 5e702b3..33ecc65 100644 --- a/tests/test_graphql/test_backup.py +++ b/tests/test_graphql/test_backup.py @@ -39,6 +39,16 @@ def memory_backup() -> AbstractBackupProvider: return memory_provider +@pytest.fixture() +def file_backup(tmpdir) -> AbstractBackupProvider: + test_repo_path = path.join(tmpdir, "test_repo") + ProviderClass = providers.get_provider(BackupProvider.FILE) + assert ProviderClass is not None + provider = ProviderClass(test_repo_path) + assert provider is not None + return provider + + @pytest.fixture() def backups(): return Backups() @@ -50,6 +60,10 @@ def test_select_backend(): assert provider == Backblaze +def test_file_backend_init(file_backup): + file_backup.backuper.init("somerepo") + + def test_backup_simple(test_service, memory_backup): # temporarily incomplete assert test_service is not None