mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-26 05:51:29 +00:00
test(backups): add a backend json reset test
This commit is contained in:
parent
79c3b9598c
commit
f02e27cf06
|
@ -108,11 +108,31 @@ def test_config_load(generic_userdata):
|
||||||
assert isinstance(provider, Backblaze)
|
assert isinstance(provider, Backblaze)
|
||||||
assert provider.login == "ID"
|
assert provider.login == "ID"
|
||||||
assert provider.key == "KEY"
|
assert provider.key == "KEY"
|
||||||
|
assert provider.location == "selfprivacy"
|
||||||
|
|
||||||
assert provider.backuper.account == "ID"
|
assert provider.backuper.account == "ID"
|
||||||
assert provider.backuper.key == "KEY"
|
assert provider.backuper.key == "KEY"
|
||||||
|
|
||||||
|
|
||||||
|
def test_json_reset(generic_userdata):
|
||||||
|
Backups.reset(reset_json=False)
|
||||||
|
provider = Backups.provider()
|
||||||
|
assert provider is not None
|
||||||
|
assert isinstance(provider, Backblaze)
|
||||||
|
assert provider.login == "ID"
|
||||||
|
assert provider.key == "KEY"
|
||||||
|
assert provider.location == "selfprivacy"
|
||||||
|
|
||||||
|
Backups.reset()
|
||||||
|
provider = Backups.provider()
|
||||||
|
assert provider is not None
|
||||||
|
assert isinstance(provider, Backblaze)
|
||||||
|
assert provider.login == ""
|
||||||
|
assert provider.key == ""
|
||||||
|
assert provider.location == ""
|
||||||
|
assert provider.repo_id == ""
|
||||||
|
|
||||||
|
|
||||||
def test_select_backend():
|
def test_select_backend():
|
||||||
provider = providers.get_provider(BackupProvider.BACKBLAZE)
|
provider = providers.get_provider(BackupProvider.BACKBLAZE)
|
||||||
assert provider is not None
|
assert provider is not None
|
||||||
|
|
Loading…
Reference in a new issue