mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-12 09:28:31 +02:00
fix cli_run fixture
This commit is contained in:
parent
d764914b54
commit
f2317a491b
1 changed files with 3 additions and 1 deletions
|
@ -32,7 +32,7 @@ all_input = '("(?P<all_input>[^"]*)")'
|
||||||
@when(re(f'we run "jrnl ?{command}" and {input_method} {all_input}'))
|
@when(re(f'we run "jrnl ?{command}" and {input_method} {all_input}'))
|
||||||
@when(parse('we run "jrnl {command}"'))
|
@when(parse('we run "jrnl {command}"'))
|
||||||
@when('we run "jrnl"')
|
@when('we run "jrnl"')
|
||||||
def we_run_jrnl(cli_run, capsys, keyring, request, command, input_method, all_input):
|
def we_run_jrnl(capsys, keyring, request, command, input_method, all_input):
|
||||||
from keyring import set_keyring
|
from keyring import set_keyring
|
||||||
|
|
||||||
set_keyring(keyring)
|
set_keyring(keyring)
|
||||||
|
@ -42,6 +42,8 @@ def we_run_jrnl(cli_run, capsys, keyring, request, command, input_method, all_in
|
||||||
inject_fixture(request, "input_method", input_method)
|
inject_fixture(request, "input_method", input_method)
|
||||||
inject_fixture(request, "all_input", all_input)
|
inject_fixture(request, "all_input", all_input)
|
||||||
|
|
||||||
|
cli_run = request.getfixturevalue("cli_run")
|
||||||
|
|
||||||
with ExitStack() as stack:
|
with ExitStack() as stack:
|
||||||
mocks = cli_run["mocks"]
|
mocks = cli_run["mocks"]
|
||||||
factories = cli_run["mock_factories"]
|
factories = cli_run["mock_factories"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue