test_request_extra_query() — anthropic-sdk-python Function Reference
Architecture documentation for the test_request_extra_query() function in test_client.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 00bcf638_2b7a_6229_4436_779751a9f9fc["test_request_extra_query()"] d53b6c34_1743_a045_4be1_3554ab153964["TestAnthropic"] 00bcf638_2b7a_6229_4436_779751a9f9fc -->|defined in| d53b6c34_1743_a045_4be1_3554ab153964 c4df7571_0ddb_0cb7_454d_79af1cb4b62d["test_request_extra_query()"] c4df7571_0ddb_0cb7_454d_79af1cb4b62d -->|calls| 00bcf638_2b7a_6229_4436_779751a9f9fc c4df7571_0ddb_0cb7_454d_79af1cb4b62d["test_request_extra_query()"] 00bcf638_2b7a_6229_4436_779751a9f9fc -->|calls| c4df7571_0ddb_0cb7_454d_79af1cb4b62d style 00bcf638_2b7a_6229_4436_779751a9f9fc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_client.py lines 496–535
def test_request_extra_query(self, client: Anthropic) -> None:
request = client._build_request(
FinalRequestOptions(
method="post",
url="/foo",
**make_request_options(
extra_query={"my_query_param": "Foo"},
),
),
)
params = dict(request.url.params)
assert params == {"my_query_param": "Foo"}
# if both `query` and `extra_query` are given, they are merged
request = client._build_request(
FinalRequestOptions(
method="post",
url="/foo",
**make_request_options(
query={"bar": "1"},
extra_query={"foo": "2"},
),
),
)
params = dict(request.url.params)
assert params == {"bar": "1", "foo": "2"}
# `extra_query` takes priority over `query` when keys clash
request = client._build_request(
FinalRequestOptions(
method="post",
url="/foo",
**make_request_options(
query={"foo": "1"},
extra_query={"foo": "2"},
),
),
)
params = dict(request.url.params)
assert params == {"foo": "2"}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does test_request_extra_query() do?
test_request_extra_query() is a function in the anthropic-sdk-python codebase, defined in tests/test_client.py.
Where is test_request_extra_query() defined?
test_request_extra_query() is defined in tests/test_client.py at line 496.
What does test_request_extra_query() call?
test_request_extra_query() calls 1 function(s): test_request_extra_query.
What calls test_request_extra_query()?
test_request_extra_query() is called by 1 function(s): test_request_extra_query.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free