mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-29 23:41:28 +00:00
test(backups): basic file backend init test
This commit is contained in:
parent
5efb351159
commit
b27f19b201
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue