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

Method test_invalid_http_client

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

Source from the content-addressed store, hash-verified

1671 await client.close()
1672
1673 def test_invalid_http_client(self) -> None:
1674 with pytest.raises(TypeError, match="Invalid `http_client` arg"):
1675 with httpx.Client() as http_client:
1676 AsyncOpenAI(
1677 base_url=base_url,
1678 api_key=api_key,
1679 admin_api_key=admin_api_key,
1680 _strict_response_validation=True,
1681 http_client=cast(Any, http_client),
1682 )
1683
1684 async def test_default_headers_option(self) -> None:
1685 test_client = AsyncOpenAI(

Callers

nothing calls this directly

Calls 1

AsyncOpenAIClass · 0.90

Tested by

no test coverage detected