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

Method test_raw_response_create

tests/api_resources/test_files.py:47–56  ·  view source on GitHub ↗
(self, client: OpenAI)

Source from the content-addressed store, hash-verified

45
46 @parametrize
47 def test_raw_response_create(self, client: OpenAI) -> None:
48 response = client.files.with_raw_response.create(
49 file=b"Example data",
50 purpose="assistants",
51 )
52
53 assert response.is_closed is True
54 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
55 file = response.parse()
56 assert_matches_type(FileObject, file, path=["response"])
57
58 @parametrize
59 def test_streaming_response_create(self, client: OpenAI) -> None:

Callers

nothing calls this directly

Calls 4

assert_matches_typeFunction · 0.90
createMethod · 0.45
getMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected