From fb9e90889ae31036c4f0ff2bc4bd34b9822fcb21 Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Tue, 22 Sep 2026 15:04:01 +0530 Subject: [PATCH] test(skills): assert only the pooled client's timeout and redirect policy The inspect-pooling test compared the full constructor kwarg dict, so any harmless future kwarg (e.g. headers=) would flip it without a behaviour change. Assert the two properties it actually proves. PROOF: dropping `timeout=` from the pooled create_ssrf_safe_client call (tools/skills_hub.py:104) fails with KeyError at the timeout assertion; changing it to `_DEFAULT_HTTP_TIMEOUT + 1` fails `assert 21 == 20`. Reverted; tests/hermes_cli/test_skills_hub.py 12 passed. --- tests/hermes_cli/test_skills_hub.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/hermes_cli/test_skills_hub.py b/tests/hermes_cli/test_skills_hub.py index 5aa6c62df4..5667360ab3 100644 --- a/tests/hermes_cli/test_skills_hub.py +++ b/tests/hermes_cli/test_skills_hub.py @@ -343,7 +343,8 @@ def test_inspect_reuses_one_ssrf_safe_client_for_metadata_and_bundle(monkeypatch assert result is not None assert len(clients) == 1 # The pooled client keeps the one-shot default timeout and never auto-follows redirects. - assert client_kwargs == [{"timeout": hub._DEFAULT_HTTP_TIMEOUT, "follow_redirects": False}] + assert client_kwargs[0]["timeout"] == hub._DEFAULT_HTTP_TIMEOUT + assert client_kwargs[0]["follow_redirects"] is False