mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-20 00:11:50 +00:00
test(mcp): mock draft cleanup in DB integration test
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
243a0615f1
commit
6996a1789c
1 changed files with 5 additions and 0 deletions
|
|
@ -141,6 +141,10 @@ async def test_create_mcp_server_direct():
|
|||
"litellm.proxy.management_endpoints.mcp_management_endpoints.get_mcp_server",
|
||||
new_callable=mock.AsyncMock,
|
||||
) as mock_get_server,
|
||||
mock.patch(
|
||||
"litellm.proxy.management_endpoints.mcp_management_endpoints._delete_draft_mcp_server",
|
||||
new_callable=mock.AsyncMock,
|
||||
) as mock_delete_draft,
|
||||
mock.patch(
|
||||
"litellm.proxy.management_endpoints.mcp_management_endpoints.global_mcp_server_manager"
|
||||
) as mock_manager,
|
||||
|
|
@ -209,6 +213,7 @@ async def test_create_mcp_server_direct():
|
|||
assert result.credentials is None
|
||||
|
||||
# Verify mocks were called
|
||||
mock_delete_draft.assert_awaited_once_with(mock_prisma, server_id)
|
||||
mock_get_server.assert_called_once_with(mock_prisma, server_id)
|
||||
mock_create.assert_called_once()
|
||||
mock_manager.add_server.assert_called_once_with(expected_response)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue