mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-28 06:51:28 +00:00
test(backups): basic file backend init test
This commit is contained in:
parent
0ce6624d5a
commit
d7f96a9adf
|
@ -39,6 +39,16 @@ def memory_backup() -> AbstractBackupProvider:
|
||||||
return memory_provider
|
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()
|
@pytest.fixture()
|
||||||
def backups():
|
def backups():
|
||||||
return Backups()
|
return Backups()
|
||||||
|
@ -50,6 +60,10 @@ def test_select_backend():
|
||||||
assert provider == Backblaze
|
assert provider == Backblaze
|
||||||
|
|
||||||
|
|
||||||
|
def test_file_backend_init(file_backup):
|
||||||
|
file_backup.backuper.init("somerepo")
|
||||||
|
|
||||||
|
|
||||||
def test_backup_simple(test_service, memory_backup):
|
def test_backup_simple(test_service, memory_backup):
|
||||||
# temporarily incomplete
|
# temporarily incomplete
|
||||||
assert test_service is not None
|
assert test_service is not None
|
||||||
|
|
Loading…
Reference in a new issue