| 1630 | |
| 1631 | @pytest.mark.respx(base_url=base_url) |
| 1632 | async def test_raw_response(self, respx_mock: MockRouter, async_client: AsyncAnthropic) -> None: |
| 1633 | respx_mock.post("/foo").mock(return_value=httpx2.Response(200, json={"foo": "bar"})) |
| 1634 | |
| 1635 | response = await async_client.post("/foo", cast_to=httpx2.Response) |
| 1636 | assert response.status_code == 200 |
| 1637 | assert isinstance(response, httpx2.Response) |
| 1638 | assert response.json() == {"foo": "bar"} |
| 1639 | |
| 1640 | @pytest.mark.respx(base_url=base_url) |
| 1641 | async def test_raw_response_for_binary(self, respx_mock: MockRouter, async_client: AsyncAnthropic) -> None: |