MCPcopy
hub / github.com/openai/openai-python / mock_handler

Method mock_handler

tests/test_client.py:2039–2041  ·  view source on GitHub ↗
(request: httpx.Request)

Source from the content-addressed store, hash-verified

2037 iterator = _make_async_iterator([file_content], counter=counter)
2038
2039 async def mock_handler(request: httpx.Request) -> httpx.Response:
2040 assert counter.value == 0, "the request body should not have been read"
2041 return httpx.Response(200, content=await request.aread())
2042
2043 async with AsyncOpenAI(
2044 base_url=base_url,

Callers

nothing calls this directly

Calls 1

areadMethod · 0.80

Tested by

no test coverage detected