Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test(proxy): stub the existing key's team in the bulk item policy tests

mateo-berridc02e5f5fb2b
diff --git a/tests/test_litellm/proxy/management_endpoints/test_key_management_endpoints.py b/tests/test_litellm/proxy/management_endpoints/test_key_management_endpoints.py
index 93c5a8c3ded..e2a68988ee2 100644
--- a/tests/test_litellm/proxy/management_endpoints/test_key_management_endpoints.py
+++ b/tests/test_litellm/proxy/management_endpoints/test_key_management_endpoints.py
@@ -13189,6 +13189,11 @@ async def _process_single_key_update_under_policy(prisma_client: AsyncMock, data
"litellm.proxy.management_endpoints.key_management_endpoints.KeyManagementEventHooks.async_key_updated_hook",
new_callable=AsyncMock,
),
+ patch( # test-quality-ok: the existing key's team is outside the policy path, as in the /key/update tests
+ "litellm.proxy.management_endpoints.key_management_endpoints.get_team_object",
+ new_callable=AsyncMock,
+ return_value=None,
+ ),
):
return await _process_single_key_update(
update_key_request=data,