Home / Function/ test_raw_response_for_binary() — anthropic-sdk-python Function Reference

test_raw_response_for_binary() — anthropic-sdk-python Function Reference

Architecture documentation for the test_raw_response_for_binary() function in test_client.py from the anthropic-sdk-python codebase.

Function python AnthropicClient SyncAPI calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  f6197800_7239_1194_baac_fe29d16c004c["test_raw_response_for_binary()"]
  9bf4cfe0_e3b0_70de_25ac_2113c8918900["TestAsyncAnthropic"]
  f6197800_7239_1194_baac_fe29d16c004c -->|defined in| 9bf4cfe0_e3b0_70de_25ac_2113c8918900
  1f603d78_5e09_2f3a_dcef_536d1e4e3baf["test_raw_response_for_binary()"]
  1f603d78_5e09_2f3a_dcef_536d1e4e3baf -->|calls| f6197800_7239_1194_baac_fe29d16c004c
  1f603d78_5e09_2f3a_dcef_536d1e4e3baf["test_raw_response_for_binary()"]
  f6197800_7239_1194_baac_fe29d16c004c -->|calls| 1f603d78_5e09_2f3a_dcef_536d1e4e3baf
  style f6197800_7239_1194_baac_fe29d16c004c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_client.py lines 1104–1112

    async def test_raw_response_for_binary(self, respx_mock: MockRouter, async_client: AsyncAnthropic) -> None:
        respx_mock.post("/foo").mock(
            return_value=httpx.Response(200, headers={"Content-Type": "application/binary"}, content='{"foo": "bar"}')
        )

        response = await async_client.post("/foo", cast_to=httpx.Response)
        assert response.status_code == 200
        assert isinstance(response, httpx.Response)
        assert response.json() == {"foo": "bar"}

Subdomains

Frequently Asked Questions

What does test_raw_response_for_binary() do?
test_raw_response_for_binary() is a function in the anthropic-sdk-python codebase, defined in tests/test_client.py.
Where is test_raw_response_for_binary() defined?
test_raw_response_for_binary() is defined in tests/test_client.py at line 1104.
What does test_raw_response_for_binary() call?
test_raw_response_for_binary() calls 1 function(s): test_raw_response_for_binary.
What calls test_raw_response_for_binary()?
test_raw_response_for_binary() is called by 1 function(s): test_raw_response_for_binary.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free