diff --git a/features/steps/core.py b/features/steps/core.py index 82581f9c..6b27b208 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -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