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

Method test_base_url_trailing_slash

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

Source from the content-addressed store, hash-verified

925 ids=["standard", "custom http client"],
926 )
927 def test_base_url_trailing_slash(self, client: OpenAI) -> None:
928 request = client._build_request(
929 FinalRequestOptions(
930 method="post",
931 url="/foo",
932 json_data={"foo": "bar"},
933 ),
934 )
935 assert request.url == "http://localhost:5000/custom/path/foo"
936 client.close()
937
938 @pytest.mark.parametrize(
939 "client",

Callers

nothing calls this directly

Calls 3

FinalRequestOptionsClass · 0.90
_build_requestMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected