mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 21:41:27 +00:00
test(backups): basic file backend init test
This commit is contained in:
parent
f1987edd99
commit
e944f4a267
|
@ -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