mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-21 05:28:31 +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):
|
def delete_password(self, servicename, username):
|
||||||
self.keys[servicename][username] = None
|
self.keys[servicename][username] = None
|
||||||
|
|
||||||
|
|
||||||
class NoKeyring(keyring.backend.KeyringBackend):
|
class NoKeyring(keyring.backend.KeyringBackend):
|
||||||
"""A test keyring that just stores its values in a hash"""
|
"""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)
|
keyring.set_password("jrnl", journal, password)
|
||||||
|
|
||||||
|
|
||||||
@when('we disable the keychain')
|
@when("we disable the keychain")
|
||||||
def disable_keychain(context):
|
def disable_keychain(context):
|
||||||
keyring.core.set_keyring(NoKeyring())
|
keyring.core.set_keyring(NoKeyring())
|
||||||
|
|
||||||
|
|
||||||
@then("we should get an error")
|
@then("we should get an error")
|
||||||
def has_error(context):
|
def has_error(context):
|
||||||
assert context.exit_status != 0, context.exit_status
|
assert context.exit_status != 0, context.exit_status
|
||||||
|
|
Loading…
Add table
Reference in a new issue