From 4c68a97c2585783443fb066fedcee2bd439102f7 Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Thu, 24 Sep 2026 11:59:52 -0700 Subject: [PATCH] test(mcp): patch create_mcp_server_if_identifier_free in the store-model-in-db MCP tests (#42916) #42791 switched the MCP management endpoints from create_mcp_server to create_mcp_server_if_identifier_free, which keeps the same arguments and returns the created row on success. Two tests in tests/store_model_in_db_tests/test_mcp_servers.py still patched the old name, so mock.patch raised AttributeError before the tests ran and proxy_store_model_in_db_tests has been red on main since. --- tests/store_model_in_db_tests/test_mcp_servers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 (