test(auth): annotate centralized auth mocks

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
jesus 2026-09-17 22:08:45 +00:00
parent 79b6cd2917
commit ee9294af53

View file

@ -5877,17 +5877,17 @@ async def test_centralized_common_checks_inherits_org_identity(
for k, v in attrs.items():
setattr(_proxy_server_mod, k, v)
with (
patch(
patch( # test-quality-ok: centralized auth calls this module helper directly; no dependency injection seam exists
"litellm.proxy.auth.user_api_key_auth.get_team_object",
new_callable=AsyncMock,
return_value=fetched_team,
) as mock_get_team_object,
patch(
patch( # test-quality-ok: centralized auth calls this module helper directly; no dependency injection seam exists
"litellm.proxy.auth.user_api_key_auth.get_org_object",
new_callable=AsyncMock,
return_value=organization,
) as mock_get_org_object,
patch(
patch( # test-quality-ok: capture downstream token state without invoking unrelated common checks
"litellm.proxy.auth.user_api_key_auth.common_checks",
new_callable=AsyncMock,
) as mock_checks,