From f686e2b9f0d9ad684c41fa2bff295ce0c45f11b3 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Tue, 23 Feb 2021 18:40:56 -0800 Subject: [PATCH] Fix local config overwrite when running pytest bdd Co-authored-by: Jonathan Wren --- tests/step_defs/conftest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/step_defs/conftest.py b/tests/step_defs/conftest.py index 995b5154..4933a3eb 100644 --- a/tests/step_defs/conftest.py +++ b/tests/step_defs/conftest.py @@ -98,8 +98,9 @@ def we_run(command, config_path, user_input, cli_run, capsys): with \ patch("sys.argv", ['jrnl'] + args), \ patch("sys.stdin.read", return_value=user_input) as mock_read, \ - patch("jrnl.install.get_config_path", return_value=config_path) \ - : + patch("jrnl.install.get_config_path", return_value=config_path), \ + patch("jrnl.config.get_config_path", return_value=config_path) \ + : # @TODO: single point of truth for get_config_path (move from all calls from install to config) try: cli(args) except SystemExit as e: