From 9c65cdb043d4c880b568d977de4ec2fc97d684ed Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Fri, 24 Jul 2026 14:39:53 -0700 Subject: [PATCH] test: accept the new profile-scoped kwargs in status fakes /api/status?profile= now passes pid_path=/path=/expected_home= to the PID and runtime-status readers; the profile-unification fakes had zero-arg signatures and raised TypeError. Plain /api/status call shapes are unchanged (pinned by the existing zero-arg tests in test_web_server.py). --- .../test_web_server_profile_unification.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/hermes_cli/test_web_server_profile_unification.py b/tests/hermes_cli/test_web_server_profile_unification.py index ffe2adc710da..d0750fac71c4 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