| 148 | |
| 149 | @pytest.mark.respx(base_url=base_url) |
| 150 | def test_raw_response(self, respx_mock: MockRouter, client: Anthropic) -> None: |
| 151 | respx_mock.post("/foo").mock(return_value=httpx2.Response(200, json={"foo": "bar"})) |
| 152 | |
| 153 | response = client.post("/foo", cast_to=httpx2.Response) |
| 154 | assert response.status_code == 200 |
| 155 | assert isinstance(response, httpx2.Response) |
| 156 | assert response.json() == {"foo": "bar"} |
| 157 | |
| 158 | @pytest.mark.respx(base_url=base_url) |
| 159 | def test_raw_response_for_binary(self, respx_mock: MockRouter, client: Anthropic) -> None: |