mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-23 00:41:40 +00:00
test(mcp): import json at module level in the MCP allowlist tests
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
14639bbb5a
commit
d240a5b6bb
1 changed files with 3 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import asyncio
|
||||
import contextlib
|
||||
import contextvars
|
||||
import json
|
||||
import os
|
||||
from datetime import datetime, timedelta
|
||||
from types import SimpleNamespace
|
||||
|
|
@ -2058,11 +2059,9 @@ async def _drain_body(receive) -> bytes:
|
|||
|
||||
|
||||
def _forbidden_client_response(send: AsyncMock) -> tuple[int, dict[str, str]]:
|
||||
import json as _json
|
||||
|
||||
start: Final = send.call_args_list[0].args[0]
|
||||
body: Final = b"".join(call.args[0].get("body", b"") for call in send.call_args_list[1:])
|
||||
return start["status"], _json.loads(body)
|
||||
return start["status"], json.loads(body)
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
|
@ -2243,9 +2242,7 @@ async def test_streamable_http_allowlist_only_inspects_initialize_requests() ->
|
|||
|
||||
|
||||
def _oversized_initialize(client_name: str, peek_cap: int) -> bytes:
|
||||
import json as _json
|
||||
|
||||
return _json.dumps(
|
||||
return json.dumps(
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 0,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue