mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 21:18:32 +02:00
black
This commit is contained in:
parent
1a0fa82677
commit
c6d8c3f4a2
1 changed files with 3 additions and 1 deletions
|
@ -40,6 +40,7 @@ class TestKeyring(keyring.backend.KeyringBackend):
|
|||
def delete_password(self, servicename, username):
|
||||
self.keys[servicename][username] = None
|
||||
|
||||
|
||||
class NoKeyring(keyring.backend.KeyringBackend):
|
||||
"""A test keyring that just stores its values in a hash"""
|
||||
|
||||
|
@ -216,10 +217,11 @@ def set_keychain(context, journal, password):
|
|||
keyring.set_password("jrnl", journal, password)
|
||||
|
||||
|
||||
@when('we disable the keychain')
|
||||
@when("we disable the keychain")
|
||||
def disable_keychain(context):
|
||||
keyring.core.set_keyring(NoKeyring())
|
||||
|
||||
|
||||
@then("we should get an error")
|
||||
def has_error(context):
|
||||
assert context.exit_status != 0, context.exit_status
|
||||
|
|
Loading…
Add table
Reference in a new issue