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(mcp): patch create_mcp_server_if_identifier_free in the store-model-in-db MCP tests (#42916)

yuneng-jiang4c68a97c2585
diff --git a/tests/store_model_in_db_tests/test_mcp_servers.py b/tests/store_model_in_db_tests/test_mcp_servers.py
index 735d5d71ad3..0e20880ede9 100644
--- a/tests/store_model_in_db_tests/test_mcp_servers.py
+++ b/tests/store_model_in_db_tests/test_mcp_servers.py
@@ -134,7 +134,7 @@ async def test_create_mcp_server_direct():
"litellm.proxy.management_endpoints.mcp_management_endpoints.get_prisma_client_or_throw"
) as mock_get_prisma,
mock.patch(
- "litellm.proxy.management_endpoints.mcp_management_endpoints.create_mcp_server",
+ "litellm.proxy.management_endpoints.mcp_management_endpoints.create_mcp_server_if_identifier_free",
new_callable=mock.AsyncMock,
) as mock_create,
mock.patch(
@@ -345,7 +345,7 @@ async def test_create_mcp_server_invalid_alias():
"litellm.proxy.management_endpoints.mcp_management_endpoints.get_mcp_server"
) as mock_get_server,
mock.patch(
- "litellm.proxy.management_endpoints.mcp_management_endpoints.create_mcp_server"
+ "litellm.proxy.management_endpoints.mcp_management_endpoints.create_mcp_server_if_identifier_free"
) as mock_create,
):
from litellm.proxy.management_endpoints.mcp_management_endpoints import (