From 0f428722988a500c61af418b32078c4c657a01f1 Mon Sep 17 00:00:00 2001 From: Chun-Mao Lai <72752478+Mecoli1219@users.noreply.github.com> Date: Sat, 24 Aug 2024 03:49:20 +0800 Subject: [PATCH] Fix local test test_get_remote (#2706) Signed-off-by: Mecoli1219 --- tests/flytekit/unit/cli/pyflyte/test_register.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/flytekit/unit/cli/pyflyte/test_register.py b/tests/flytekit/unit/cli/pyflyte/test_register.py index 66967393fb..39021d47ac 100644 --- a/tests/flytekit/unit/cli/pyflyte/test_register.py +++ b/tests/flytekit/unit/cli/pyflyte/test_register.py @@ -48,8 +48,10 @@ def reset_flytectl_config_env_var() -> pytest.fixture(): return os.environ[FLYTECTL_CONFIG_ENV_VAR] +@mock.patch("flytekit.configuration.plugin.get_config_file") @mock.patch("flytekit.configuration.plugin.FlyteRemote") -def test_get_remote(mock_remote, reset_flytectl_config_env_var): +def test_get_remote(mock_remote, mock_config_file, reset_flytectl_config_env_var): + mock_config_file.return_value = None r = FlytekitPlugin.get_remote(None, "p", "d") assert r is not None mock_remote.assert_called_once_with(