MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / test_raw_response

Method test_raw_response

tests/test_client.py:65–71  ·  view source on GitHub ↗
(self, respx_mock: MockRouter)

Source from the content-addressed store, hash-verified

63
64 @pytest.mark.respx(base_url=base_url)
65 def test_raw_response(self, respx_mock: MockRouter) -> None:
66 respx_mock.post("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
67
68 response = self.client.post("/foo", cast_to=httpx.Response)
69 assert response.status_code == 200
70 assert isinstance(response, httpx.Response)
71 assert response.json() == {"foo": "bar"}
72
73 @pytest.mark.respx(base_url=base_url)
74 def test_raw_response_for_binary(self, respx_mock: MockRouter) -> None:

Callers

nothing calls this directly

Calls 2

postMethod · 0.45
jsonMethod · 0.45

Tested by

no test coverage detected