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

Method test_invalid_http_client

tests/test_client.py:408–417  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

406 client.close()
407
408 async def test_invalid_http_client(self) -> None:
409 with pytest.raises(TypeError, match="Invalid `http_client` arg"):
410 async with httpx.AsyncClient() as http_client:
411 OpenAI(
412 base_url=base_url,
413 api_key=api_key,
414 admin_api_key=admin_api_key,
415 _strict_response_validation=True,
416 http_client=cast(Any, http_client),
417 )
418
419 def test_default_headers_option(self) -> None:
420 test_client = OpenAI(

Callers

nothing calls this directly

Calls 1

OpenAIClass · 0.90

Tested by

no test coverage detected