mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-18 00:19:15 +00:00
fix(backups): make sure location and credentials get properly passed around
This commit is contained in:
parent
c5c41b3ced
commit
d10bf99927
|
@ -12,6 +12,7 @@ class AbstractBackupProvider(ABC):
|
||||||
def backuper(self) -> AbstractBackuper:
|
def backuper(self) -> AbstractBackuper:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def __init__(self, login="", key=""):
|
def __init__(self, login="", key="", location=""):
|
||||||
|
self.backuper.set_creds(login, key, location)
|
||||||
self.login = login
|
self.login = login
|
||||||
self.key = key
|
self.key = key
|
||||||
|
|
|
@ -109,6 +109,9 @@ def test_config_load(generic_userdata):
|
||||||
assert provider.login == "ID"
|
assert provider.login == "ID"
|
||||||
assert provider.key == "KEY"
|
assert provider.key == "KEY"
|
||||||
|
|
||||||
|
assert provider.backuper.account == "ID"
|
||||||
|
assert provider.backuper.key == "KEY"
|
||||||
|
|
||||||
|
|
||||||
def test_select_backend():
|
def test_select_backend():
|
||||||
provider = providers.get_provider(BackupProvider.BACKBLAZE)
|
provider = providers.get_provider(BackupProvider.BACKBLAZE)
|
||||||
|
|
Loading…
Reference in a new issue