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.
This commit is contained in:
Vineeth Sai 2026-08-25 12:58:07 -07:00
parent 4704dbc5f2
commit 34f84db178

View file

@ -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,
),