diff --git a/features/steps/core.py b/features/steps/core.py index 20c455c8..8b49cbb2 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -83,6 +83,10 @@ class FailedKeyring(keyring.backend.KeyringBackend): self.keys[servicename][username] = None +# set a default keyring +keyring.set_keyring(TestKeyring()) + + def ushlex(command): return shlex.split(command, posix=not on_windows) @@ -458,7 +462,7 @@ def check_output_inline(context, text=None, text2=None): def check_error_output_inline(context, text=None, text2=None): text = text or context.text out = context.stderr_capture.getvalue() - assert text in out or text2 in out, text or text2 + assert (text and text in out) or (text2 and text2 in out) @then('the output should match "{regex}"') diff --git a/features/write.feature b/features/write.feature index 4dbf7ce4..45e499da 100644 --- a/features/write.feature +++ b/features/write.feature @@ -16,17 +16,17 @@ Feature: Writing new entries. Scenario Outline: Single line entry with period should be split at period Given we use the config ".yaml" - And we use the password "bad doggie no biscuit" if prompted + And we use the password "test" if prompted When we run "jrnl This is. the title" - And we run "jrnl -n 1" + And we run "jrnl -1" Then the output should contain "| the title" Examples: configs - | config_file | - | simple | - | empty_folder | - | dayone | - | encrypted | + | config_file | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | Scenario Outline: Writing an entry from command line should store the entry Given we use the config ".yaml"