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

test_binary_content_upload() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  01fe5115_a465_a84d_d746_ee01b2e40101["test_binary_content_upload()"]
  d53b6c34_1743_a045_4be1_3554ab153964["TestAnthropic"]
  01fe5115_a465_a84d_d746_ee01b2e40101 -->|defined in| d53b6c34_1743_a045_4be1_3554ab153964
  52e84651_891a_10e8_724c_3d7b7dc99906["test_binary_content_upload()"]
  52e84651_891a_10e8_724c_3d7b7dc99906 -->|calls| 01fe5115_a465_a84d_d746_ee01b2e40101
  52e84651_891a_10e8_724c_3d7b7dc99906["test_binary_content_upload()"]
  01fe5115_a465_a84d_d746_ee01b2e40101 -->|calls| 52e84651_891a_10e8_724c_3d7b7dc99906
  style 01fe5115_a465_a84d_d746_ee01b2e40101 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_client.py lines 567–581

    def test_binary_content_upload(self, respx_mock: MockRouter, client: Anthropic) -> None:
        respx_mock.post("/upload").mock(side_effect=mirror_request_content)

        file_content = b"Hello, this is a test file."

        response = client.post(
            "/upload",
            content=file_content,
            cast_to=httpx.Response,
            options={"headers": {"Content-Type": "application/octet-stream"}},
        )

        assert response.status_code == 200
        assert response.request.headers["Content-Type"] == "application/octet-stream"
        assert response.content == file_content

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free