mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
Merge 8329a32f3f into c2c2a623c0
This commit is contained in:
commit
350ed831c8
2 changed files with 11 additions and 5 deletions
|
|
@ -2306,6 +2306,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(),
|
||||
|
|
@ -3459,6 +3463,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,
|
||||
|
|
|
|||
|
|
@ -172,11 +172,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