From c50b91039d56b99cf53e76b31d3a1da24cef77ec Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 3 Sep 2026 19:27:52 -0700 Subject: [PATCH] =?UTF-8?q?fix(test-seams):=20cron/update/auth/transcripti?= =?UTF-8?q?on/computer-use=20=E2=80=94=20patch=20the=20module=20production?= =?UTF-8?q?=20actually=20reads=20(10=20files)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/hermes_cli/test_cmd_update.py | 5 ++++- tests/hermes_cli/test_model_provider_persistence.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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)