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

Method test_absolute_request_url

tests/test_client.py:987–996  ·  view source on GitHub ↗
(self, client: OpenAI)

Source from the content-addressed store, hash-verified

985 ids=["standard", "custom http client"],
986 )
987 def test_absolute_request_url(self, client: OpenAI) -> None:
988 request = client._build_request(
989 FinalRequestOptions(
990 method="post",
991 url="https://myapi.com/foo",
992 json_data={"foo": "bar"},
993 ),
994 )
995 assert request.url == "https://myapi.com/foo"
996 client.close()
997
998 def test_copied_client_does_not_close_http(self) -> None:
999 test_client = OpenAI(

Callers

nothing calls this directly

Calls 3

FinalRequestOptionsClass · 0.90
_build_requestMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected