test(backups): basic file backend init test

This commit is contained in:
Houkime 2023-02-20 11:50:52 +00:00
parent 0ce6624d5a
commit d7f96a9adf

View file

@ -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