From a6d5f8a2d1d2e8a122849ad25b692e38f0bf4eeb Mon Sep 17 00:00:00 2001 From: L4XB Date: Tue, 15 Sep 2026 17:24:17 +0200 Subject: [PATCH] test(proxy): declare the guard cell's patch to the test-quality gate The lint job's test-quality budget failed with TQ008 over its ceiling by one, naming the new guard cell. TQ008 asks a patched SDK internal to be replaced by a faked HTTP boundary or an injected collaborator, and neither applies here: the cell exists to observe what the proxy-admin substitution hands common_checks, so that call is the subject rather than incidental wiring, and there is no seam to inject on it. Suppressed with the reason inline, which is the mechanism the gate documents and the form the file already uses four times. The budget file is untouched. scripts/test_quality_gate.py --base c8114ba41f now reports every TQ rule within its ceiling. --- tests/test_litellm/proxy/auth/test_user_api_key_auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_litellm/proxy/auth/test_user_api_key_auth.py b/tests/test_litellm/proxy/auth/test_user_api_key_auth.py index 65509e97327..b290b3507df 100644 --- a/tests/test_litellm/proxy/auth/test_user_api_key_auth.py +++ b/tests/test_litellm/proxy/auth/test_user_api_key_auth.py @@ -4328,7 +4328,7 @@ async def test_centralized_checks_keep_admin_role_when_the_db_row_is_not_admin() token = UserAPIKeyAuth(user_id="admin-user", user_role=LitellmUserRoles.PROXY_ADMIN) with _proxy_admin_world(demoted_row): - with patch( + with patch( # test-quality-ok: what the substitution hands common_checks IS the subject; no HTTP boundary and no injection seam on that call "litellm.proxy.auth.user_api_key_auth.common_checks", new_callable=AsyncMock, ) as mock_checks: