MCPcopy Index your code
hub / github.com/openai/openai-python / test_base_url_no_trailing_slash

Method test_base_url_no_trailing_slash

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

Source from the content-addressed store, hash-verified

955 ids=["standard", "custom http client"],
956 )
957 def test_base_url_no_trailing_slash(self, client: OpenAI) -> None:
958 request = client._build_request(
959 FinalRequestOptions(
960 method="post",
961 url="/foo",
962 json_data={"foo": "bar"},
963 ),
964 )
965 assert request.url == "http://localhost:5000/custom/path/foo"
966 client.close()
967
968 @pytest.mark.parametrize(
969 "client",

Callers

nothing calls this directly

Calls 3

FinalRequestOptionsClass · 0.90
_build_requestMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected