(self, client: OpenAI, respx_mock: MockRouter)
| 193 | @parametrize |
| 194 | @pytest.mark.respx(base_url=base_url) |
| 195 | def test_raw_response_content(self, client: OpenAI, respx_mock: MockRouter) -> None: |
| 196 | respx_mock.get("/files/string/content").mock(return_value=httpx.Response(200, json={"foo": "bar"})) |
| 197 | |
| 198 | response = client.files.with_raw_response.content( |
| 199 | "string", |
| 200 | ) |
| 201 | |
| 202 | assert response.is_closed is True |
| 203 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 204 | file = response.parse() |
| 205 | assert_matches_type(_legacy_response.HttpxBinaryResponseContent, file, path=["response"]) |
| 206 | |
| 207 | @parametrize |
| 208 | @pytest.mark.respx(base_url=base_url) |
nothing calls this directly
no test coverage detected