2018-12-14 08:03:26 +00:00
|
|
|
import uuid
|
2020-09-27 07:19:39 +00:00
|
|
|
from vorta.keyring.abc import get_keyring
|
2018-12-14 08:03:26 +00:00
|
|
|
|
|
|
|
|
2020-03-03 05:19:36 +00:00
|
|
|
def test_keyring(qapp):
|
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
|
|
|
|
|
2020-09-27 07:19:39 +00:00
|
|
|
keyring = 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
|