fix cli_run fixture

This commit is contained in:
Jonathan Wren 2023-02-04 13:08:31 -08:00
parent d764914b54
commit f2317a491b
No known key found for this signature in database

View file

@ -32,7 +32,7 @@ all_input = '("(?P<all_input>[^"]*)")'
@when(re(f'we run "jrnl ?{command}" and {input_method} {all_input}'))
@when(parse('we run "jrnl {command}"'))
@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
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, "all_input", all_input)
cli_run = request.getfixturevalue("cli_run")
with ExitStack() as stack:
mocks = cli_run["mocks"]
factories = cli_run["mock_factories"]