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

test_default_query_option() — anthropic-sdk-python Function Reference

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

Function python AnthropicClient AsyncAPI calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  7024c2b6_aa2e_0102_54ae_ba7029b5d271["test_default_query_option()"]
  d53b6c34_1743_a045_4be1_3554ab153964["TestAnthropic"]
  7024c2b6_aa2e_0102_54ae_ba7029b5d271 -->|defined in| d53b6c34_1743_a045_4be1_3554ab153964
  1ef038b1_cd62_0578_cb80_a4a831094128["test_default_query_option()"]
  1ef038b1_cd62_0578_cb80_a4a831094128 -->|calls| 7024c2b6_aa2e_0102_54ae_ba7029b5d271
  1ef038b1_cd62_0578_cb80_a4a831094128["test_default_query_option()"]
  7024c2b6_aa2e_0102_54ae_ba7029b5d271 -->|calls| 1ef038b1_cd62_0578_cb80_a4a831094128
  style 7024c2b6_aa2e_0102_54ae_ba7029b5d271 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_client.py lines 420–438

    def test_default_query_option(self) -> None:
        client = Anthropic(
            base_url=base_url, api_key=api_key, _strict_response_validation=True, default_query={"query_param": "bar"}
        )
        request = client._build_request(FinalRequestOptions(method="get", url="/foo"))
        url = httpx.URL(request.url)
        assert dict(url.params) == {"query_param": "bar"}

        request = client._build_request(
            FinalRequestOptions(
                method="get",
                url="/foo",
                params={"foo": "baz", "query_param": "overridden"},
            )
        )
        url = httpx.URL(request.url)
        assert dict(url.params) == {"foo": "baz", "query_param": "overridden"}

        client.close()

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free