test_binary_content_upload_with_body_is_deprecated() — anthropic-sdk-python Function Reference
Architecture documentation for the test_binary_content_upload_with_body_is_deprecated() function in test_client.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 3ea53f7d_0768_d9e9_2f8c_7ad925d93bde["test_binary_content_upload_with_body_is_deprecated()"] d53b6c34_1743_a045_4be1_3554ab153964["TestAnthropic"] 3ea53f7d_0768_d9e9_2f8c_7ad925d93bde -->|defined in| d53b6c34_1743_a045_4be1_3554ab153964 b0682c63_f6f6_03f9_7fa5_443651614e2b["test_binary_content_upload_with_body_is_deprecated()"] b0682c63_f6f6_03f9_7fa5_443651614e2b -->|calls| 3ea53f7d_0768_d9e9_2f8c_7ad925d93bde b0682c63_f6f6_03f9_7fa5_443651614e2b["test_binary_content_upload_with_body_is_deprecated()"] 3ea53f7d_0768_d9e9_2f8c_7ad925d93bde -->|calls| b0682c63_f6f6_03f9_7fa5_443651614e2b style 3ea53f7d_0768_d9e9_2f8c_7ad925d93bde fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_client.py lines 611–628
def test_binary_content_upload_with_body_is_deprecated(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."
with pytest.deprecated_call(
match="Passing raw bytes as `body` is deprecated and will be removed in a future version. Please pass raw bytes via the `content` parameter instead."
):
response = client.post(
"/upload",
body=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
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_binary_content_upload_with_body_is_deprecated() do?
test_binary_content_upload_with_body_is_deprecated() is a function in the anthropic-sdk-python codebase, defined in tests/test_client.py.
Where is test_binary_content_upload_with_body_is_deprecated() defined?
test_binary_content_upload_with_body_is_deprecated() is defined in tests/test_client.py at line 611.
What does test_binary_content_upload_with_body_is_deprecated() call?
test_binary_content_upload_with_body_is_deprecated() calls 1 function(s): test_binary_content_upload_with_body_is_deprecated.
What calls test_binary_content_upload_with_body_is_deprecated()?
test_binary_content_upload_with_body_is_deprecated() is called by 1 function(s): test_binary_content_upload_with_body_is_deprecated.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free