Skip to content

The agent that grows with you

test: accept the new profile-scoped kwargs in status fakes

teknium19c65cdb043d4
diff --git a/tests/hermes_cli/test_web_server_profile_unification.py b/tests/hermes_cli/test_web_server_profile_unification.py
index ffe2adc710d..d0750fac71c 100644
--- a/tests/hermes_cli/test_web_server_profile_unification.py
+++ b/tests/hermes_cli/test_web_server_profile_unification.py
@@ -525,7 +525,9 @@ class TestProfileScopedGateway:
seen_homes = []
- def fake_get_running_pid():
+ def fake_get_running_pid(*args, **kwargs):
+ # /api/status?profile= now passes pid_path= explicitly (the TTL
+ # cache would otherwise serve another profile's PID) — accept it.
seen_homes.append(str(get_hermes_home()))
return None
@@ -536,7 +538,7 @@ class TestProfileScopedGateway:
monkeypatch.setattr(
web_server,
"read_runtime_status",
- lambda: {"gateway_state": "startup_failed", "platforms": {}},
+ lambda *a, **k: {"gateway_state": "startup_failed", "platforms": {}},
)
monkeypatch.setattr(web_server, "_GATEWAY_HEALTH_URL", None)
@@ -567,10 +569,14 @@ class TestProfileScopedGateway:
"updated_at": "2026-06-17T00:00:00+00:00",
}
monkeypatch.setattr(web_server, "check_config_version", lambda: (1, 1))
- monkeypatch.setattr(web_server, "get_running_pid_cached", lambda: None)
- monkeypatch.setattr(web_server, "read_runtime_status", lambda: runtime)
monkeypatch.setattr(
- web_server, "get_runtime_status_running_pid", lambda payload: 4242
+ web_server, "get_running_pid_cached", lambda *a, **k: None
+ )
+ monkeypatch.setattr(web_server, "read_runtime_status", lambda *a, **k: runtime)
+ monkeypatch.setattr(
+ web_server,
+ "get_runtime_status_running_pid",
+ lambda payload, **k: 4242,
)
monkeypatch.setattr(web_server, "_GATEWAY_HEALTH_URL", None)
from gateway.config import Platform