(self, client: OpenAI)
| 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( |
nothing calls this directly
no test coverage detected