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ß'
|
|
|
|
REPO = f'vorta-test-repo.{uuid.uuid4()}.com:repo' # Random repo URL
|
|
|
|
|
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
|