2018-12-14 08:03:26 +00:00
|
|
|
import uuid
|
2021-01-18 07:52:07 +00:00
|
|
|
from vorta.keyring.abc import VortaKeyring
|
2018-12-14 08:03:26 +00:00
|
|
|
|
|
|
|
|
2021-02-22 01:45:43 +00:00
|
|
|
def test_keyring():
|
2018-12-14 08:03:26 +00:00
|
|
|
UNICODE_PW = 'kjalsdfüadsfäadsfß'
|
2022-12-16 10:19:34 +00:00
|
|
|
REPO = f'ssh://asdf123@vorta-test-repo.{uuid.uuid4()}.com/./repo' # Random repo URL
|
2018-12-14 08:03:26 +00:00
|
|
|
|
2021-01-18 07:52:07 +00:00
|
|
|
keyring = VortaKeyring.get_keyring()
|
2018-12-14 08:03:26 +00:00
|
|
|
keyring.set_password('vorta-repo', REPO, UNICODE_PW)
|
|
|
|
assert keyring.get_password("vorta-repo", REPO) == UNICODE_PW
|