mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 04:58:32 +02:00
Support types in set_keyring step
This commit is contained in:
parent
cce978b4ab
commit
a699f284dc
1 changed files with 8 additions and 4 deletions
|
@ -164,10 +164,14 @@ def use_password(context, password, num=1):
|
|||
context.password = iter([password] * num)
|
||||
|
||||
|
||||
@given("we have a keyring")
|
||||
def set_keyring(context):
|
||||
keyring.set_keyring(TestKeyring())
|
||||
|
||||
@given("we have a {type} keyring")
|
||||
def set_keyring(context, type=None):
|
||||
if type == "locked":
|
||||
keyring.set_keyring(LockedKeyring())
|
||||
elif type == "failed":
|
||||
keyring.set_keyring(FailedKeyring())
|
||||
else:
|
||||
keyring.set_keyring(TestKeyring())
|
||||
|
||||
@given("we do not have a keyring")
|
||||
def disable_keyring(context):
|
||||
|
|
Loading…
Add table
Reference in a new issue