diff --git a/tests/hermes_cli/test_cmd_update.py b/tests/hermes_cli/test_cmd_update.py index f7ba0b2ada..a17c13595a 100644 --- a/tests/hermes_cli/test_cmd_update.py +++ b/tests/hermes_cli/test_cmd_update.py @@ -1448,7 +1448,10 @@ class TestUpdateNodeDependencies: monkeypatch.setattr(hm, "PROJECT_ROOT", tmp_path) monkeypatch.setattr(hm, "_npm_lockfile_changed", lambda root: True) recorded = [] - monkeypatch.setattr(update_cmd, "_record_npm_lockfile_hash", lambda root: recorded.append(root)) + # _update_node_dependencies lives in update_cmd_deps and calls its own module-level + # _record_npm_lockfile_hash, so that binding is the real seam (update_cmd's is dead). + from hermes_cli import update_cmd_deps + monkeypatch.setattr(update_cmd_deps, "_record_npm_lockfile_hash", lambda root: recorded.append(root)) mock_popen.side_effect = self._make_popen([], returncode=1, stderr_lines=["npm ERR!\n"]) update_cmd._update_node_dependencies() diff --git a/tests/hermes_cli/test_model_provider_persistence.py b/tests/hermes_cli/test_model_provider_persistence.py index a18d5259fd..5607591c0d 100644 --- a/tests/hermes_cli/test_model_provider_persistence.py +++ b/tests/hermes_cli/test_model_provider_persistence.py @@ -165,7 +165,7 @@ class TestZaiEndpointPicker: from hermes_cli.auth import ZAI_ENDPOINTS custom_idx = len(ZAI_ENDPOINTS) - with patch("hermes_cli.main._prompt_provider_choice", return_value=custom_idx), \ + with patch("hermes_cli.main_provider_setup._prompt_provider_choice", return_value=custom_idx), \ patch("hermes_cli.auth._prompt_model_selection", return_value="glm-5"), \ patch("hermes_cli.auth.deactivate_provider"), \ patch("builtins.input", return_value="not-a-url"): @@ -192,7 +192,7 @@ class TestZaiEndpointPicker: captured["choices"] = choices return default - with patch("hermes_cli.main._prompt_provider_choice", side_effect=fake_choice): + with patch("hermes_cli.main_provider_setup._prompt_provider_choice", side_effect=fake_choice): result = _select_zai_endpoint(coding_url) # Default should point at index 2 (coding-global)