test(status): point status-view mocks at the refresh-free classifier
show_status now reads get_nous_auth_status_local(); the test_status.py mocks still patched the old live-resolve entry point, so the patched dict was never consumed (CI slice 8/8 red on the salvage PR).
This commit is contained in:
parent
5ea2e0a0bc
commit
f7c5e0d59a
|
|
@ -28,7 +28,7 @@ def test_show_status_termux_gateway_section_skips_systemctl(monkeypatch, capsys,
|
|||
monkeypatch.setattr(status_mod, "resolve_requested_provider", lambda requested=None: "openai-codex", raising=False)
|
||||
monkeypatch.setattr(status_mod, "resolve_provider", lambda requested=None, **kwargs: "openai-codex", raising=False)
|
||||
monkeypatch.setattr(status_mod, "provider_label", lambda provider: "OpenAI Codex", raising=False)
|
||||
monkeypatch.setattr(auth_mod, "get_nous_auth_status", lambda: {}, raising=False)
|
||||
monkeypatch.setattr(auth_mod, "get_nous_auth_status_local", lambda: {}, raising=False)
|
||||
monkeypatch.setattr(auth_mod, "get_codex_auth_status", lambda: {}, raising=False)
|
||||
monkeypatch.setattr(auth_mod, "get_xai_oauth_auth_status", lambda: {}, raising=False)
|
||||
monkeypatch.setattr(gateway_mod, "find_gateway_pids", lambda exclude_pids=None: [], raising=False)
|
||||
|
|
@ -59,7 +59,7 @@ def test_show_status_reports_nous_auth_error(monkeypatch, capsys, tmp_path):
|
|||
monkeypatch.setattr(status_mod, "provider_label", lambda provider: "OpenAI Codex", raising=False)
|
||||
monkeypatch.setattr(
|
||||
auth_mod,
|
||||
"get_nous_auth_status",
|
||||
"get_nous_auth_status_local",
|
||||
lambda: {
|
||||
"logged_in": False,
|
||||
"portal_base_url": "https://portal.nousresearch.com",
|
||||
|
|
@ -98,7 +98,7 @@ def test_show_status_reports_nous_inference_key_without_portal_login(monkeypatch
|
|||
monkeypatch.setattr(status_mod, "provider_label", lambda provider: "OpenAI Codex", raising=False)
|
||||
monkeypatch.setattr(
|
||||
auth_mod,
|
||||
"get_nous_auth_status",
|
||||
"get_nous_auth_status_local",
|
||||
lambda: {
|
||||
"logged_in": False,
|
||||
"inference_credential_present": True,
|
||||
|
|
@ -150,7 +150,7 @@ def _base_xai_mocks(monkeypatch, tmp_path):
|
|||
monkeypatch.setattr(status_mod, "resolve_requested_provider", lambda requested=None: "openai-codex", raising=False)
|
||||
monkeypatch.setattr(status_mod, "resolve_provider", lambda requested=None, **kwargs: "openai-codex", raising=False)
|
||||
monkeypatch.setattr(status_mod, "provider_label", lambda provider: "OpenAI Codex", raising=False)
|
||||
monkeypatch.setattr(auth_mod, "get_nous_auth_status", lambda: {}, raising=False)
|
||||
monkeypatch.setattr(auth_mod, "get_nous_auth_status_local", lambda: {}, raising=False)
|
||||
monkeypatch.setattr(auth_mod, "get_codex_auth_status", lambda: {}, raising=False)
|
||||
monkeypatch.setattr(auth_mod, "get_qwen_auth_status", lambda: {}, raising=False)
|
||||
monkeypatch.setattr(auth_mod, "get_minimax_oauth_auth_status", lambda: {}, raising=False)
|
||||
|
|
@ -315,7 +315,7 @@ class TestShowStatusXaiOAuth:
|
|||
"""Nous/Codex/MiniMax rows must still appear when xAI import fails."""
|
||||
import hermes_cli.auth as auth_mod
|
||||
status_mod = _base_xai_mocks(monkeypatch, tmp_path)
|
||||
monkeypatch.setattr(auth_mod, "get_nous_auth_status",
|
||||
monkeypatch.setattr(auth_mod, "get_nous_auth_status_local",
|
||||
lambda: {"logged_in": True}, raising=False)
|
||||
monkeypatch.delattr(auth_mod, "get_xai_oauth_auth_status", raising=False)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue