MCPcopy
hub / github.com/anthropics/anthropic-sdk-python / test_raw_response

Method test_raw_response

tests/test_client.py:133–139  ·  tests/test_client.py::TestAnthropic.test_raw_response
(self, respx_mock: MockRouter, client: Anthropic)

Source from the content-addressed store, hash-verified

131class TestAnthropic:
132 @pytest.mark.respx(base_url=base_url)
133 def test_raw_response(self, respx_mock: MockRouter, client: Anthropic) -> None:
134 respx_mock.post(class="st">"/foo").mock(return_value=httpx.Response(200, json={class="st">"foo": class="st">"bar"}))
135
136 response = client.post(class="st">"/foo", cast_to=httpx.Response)
137 assert response.status_code == 200
138 assert isinstance(response, httpx.Response)
139 assert response.json() == {class="st">"foo": class="st">"bar"}
140
141 @pytest.mark.respx(base_url=base_url)
142 def test_raw_response_for_binary(self, respx_mock: MockRouter, client: Anthropic) -> None:

Callers

nothing calls this directly

Calls 2

postMethod · 0.45
jsonMethod · 0.45

Tested by

no test coverage detected