From 34f84db178eb9e17aeaf7a8b7568db3486535580 Mon Sep 17 00:00:00 2001 From: Vineeth Sai Date: Tue, 25 Aug 2026 12:58:07 -0700 Subject: [PATCH] chore(mcp): give the two discovery patches test-quality reasons The test-quality gate flags TQ008 on both `patch(...)` calls in the new test. Neither is pinning the test to the wiring: the first substitutes a real `httpx.AsyncClient` over a `MockTransport`, which is the HTTP boundary the rule asks for, and `_discover_metadata_recording_attempts` builds its own client with no injection seam, so a patch is the only way the fake gets in; the other discovery tests in this file do the same. The second is a module constant, shortened so the read-timeout assertion does not take the production timeout. --- .../proxy/_experimental/mcp_server/test_mcp_server_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py b/tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py index d4ecde38fac..d861c20b700 100644 --- a/tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py +++ b/tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py @@ -10948,11 +10948,11 @@ class TestOAuthDiscoveryAgainstAnOpenEventStream: handler, transport = self._handler(gap=timeout / 4, timeout=timeout) with ( - patch( + patch( # test-quality-ok: the fake IS the HTTP boundary, a real httpx.AsyncClient over MockTransport; _discover_metadata_recording_attempts builds its own client with no injection seam, and the other discovery tests in this file substitute it the same way "litellm.proxy._experimental.mcp_server.mcp_server_manager.get_async_httpx_client", return_value=handler, ), - patch( + patch( # test-quality-ok: a module constant, not wiring; shortened so the read-timeout assertion does not take the production timeout to run "litellm.proxy._experimental.mcp_server.mcp_server_manager.MCP_METADATA_TIMEOUT", timeout, ),