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

test_raw_response_download() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  5d471873_8301_e07d_868c_e31d82726246["test_raw_response_download()"]
  0d4638a9_c546_5068_00a8_9c0b786b1733["TestAsyncFiles"]
  5d471873_8301_e07d_868c_e31d82726246 -->|defined in| 0d4638a9_c546_5068_00a8_9c0b786b1733
  eebd9fe3_ddb9_6135_2eec_662a9b3e0e41["test_raw_response_download()"]
  eebd9fe3_ddb9_6135_2eec_662a9b3e0e41 -->|calls| 5d471873_8301_e07d_868c_e31d82726246
  eebd9fe3_ddb9_6135_2eec_662a9b3e0e41["test_raw_response_download()"]
  5d471873_8301_e07d_868c_e31d82726246 -->|calls| eebd9fe3_ddb9_6135_2eec_662a9b3e0e41
  style 5d471873_8301_e07d_868c_e31d82726246 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/api_resources/beta/test_files.py lines 386–398

    async def test_raw_response_download(self, async_client: AsyncAnthropic, respx_mock: MockRouter) -> None:
        respx_mock.get("/v1/files/file_id/content?beta=true").mock(
            return_value=httpx.Response(200, json={"foo": "bar"})
        )

        file = await async_client.beta.files.with_raw_response.download(
            file_id="file_id",
        )

        assert file.is_closed is True
        assert file.http_request.headers.get("X-Stainless-Lang") == "python"
        assert await file.json() == {"foo": "bar"}
        assert isinstance(file, AsyncBinaryAPIResponse)

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free