fix(test-seams): cron/update/auth/transcription/computer-use — patch the module production actually reads (10 files)
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user