(self, client: Anthropic | AsyncAnthropic)
| 58 | """the last request that went over the wire""" |
| 59 | |
| 60 | def __init__(self, client: Anthropic | AsyncAnthropic) -> None: |
| 61 | transport = httpx2.MockTransport(self._record) |
| 62 | self._client: Anthropic | AsyncAnthropic |
| 63 | if isinstance(client, Anthropic): |
| 64 | self._client = client.with_options(http_client=httpx2.Client(transport=transport), max_retries=0) |
| 65 | else: |
| 66 | self._client = client.with_options(http_client=httpx2.AsyncClient(transport=transport), max_retries=0) |
| 67 | |
| 68 | def _record(self, request: httpx2.Request) -> httpx2.Response: |
| 69 | self.request = request |
nothing calls this directly
no test coverage detected