mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
Merge 8329a32f3f into 5a5e563938
This commit is contained in:
commit
6d6e68f1d6
2 changed files with 11 additions and 5 deletions
|
|
@ -2642,6 +2642,10 @@ class TestTemporaryMCPSessionEndpoints:
|
|||
"litellm.proxy.management_endpoints.mcp_management_endpoints.global_mcp_server_manager",
|
||||
mock_manager,
|
||||
),
|
||||
patch(
|
||||
"litellm.proxy.management_endpoints.mcp_management_endpoints._get_prisma_client_or_none",
|
||||
return_value=None,
|
||||
),
|
||||
patch(
|
||||
"litellm.proxy.management_endpoints.mcp_management_endpoints._cache_temporary_mcp_server",
|
||||
MagicMock(),
|
||||
|
|
@ -3795,6 +3799,10 @@ class TestTemporaryMCPSessionEndpoints:
|
|||
"litellm.proxy.management_endpoints.mcp_management_endpoints._temporary_mcp_servers",
|
||||
{},
|
||||
),
|
||||
patch(
|
||||
"litellm.proxy.management_endpoints.mcp_management_endpoints._get_prisma_client_or_none",
|
||||
return_value=None,
|
||||
),
|
||||
patch(
|
||||
"litellm.proxy.management_endpoints.mcp_management_endpoints.decrypt_value_helper",
|
||||
return_value=serialized,
|
||||
|
|
|
|||
|
|
@ -210,11 +210,9 @@ mock_prisma_client.db.litellm_auditlog.create = AsyncMock()
|
|||
|
||||
# Fixture to provide the mock prisma client
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_db_client():
|
||||
with patch(
|
||||
"litellm.proxy.proxy_server.prisma_client", mock_prisma_client
|
||||
): # Mock in both places if necessary
|
||||
yield mock_prisma_client
|
||||
def mock_db_client(monkeypatch):
|
||||
monkeypatch.setattr("litellm.proxy.proxy_server.prisma_client", mock_prisma_client)
|
||||
yield mock_prisma_client
|
||||
mock_prisma_client.reset_mock()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue