mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-11 10:29:30 +00:00
fix(backups): do not rely on obscure behaviour
This commit is contained in:
parent
b40df670f8
commit
c5b227226c
|
@ -21,6 +21,8 @@ PROVIDER_MAPPING: dict[BackupProviderEnum, Type[AbstractBackupProvider]] = {
|
|||
def get_provider(
|
||||
provider_type: BackupProviderEnum,
|
||||
) -> Type[AbstractBackupProvider]:
|
||||
if provider_type not in PROVIDER_MAPPING.keys():
|
||||
raise LookupError("could not look up provider", provider_type)
|
||||
return PROVIDER_MAPPING[provider_type]
|
||||
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ def test_error_censoring_loginkey(dummy_service, backups, fp):
|
|||
secret = "aSecretNYA"
|
||||
|
||||
Backups.set_provider(
|
||||
BackupProvider.BACKBLAZE, login="meow", key=secret, location="moon"
|
||||
ProviderEnum.BACKBLAZE, login="meow", key=secret, location="moon"
|
||||
)
|
||||
assert Backups.provider().key == secret
|
||||
|
||||
|
|
Loading…
Reference in a new issue