test_non_application_json_content_type_for_json_data() — anthropic-sdk-python Function Reference
Architecture documentation for the test_non_application_json_content_type_for_json_data() function in test_client.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 69f806f7_a8b4_de7d_49ff_0b9ba520a407["test_non_application_json_content_type_for_json_data()"] d53b6c34_1743_a045_4be1_3554ab153964["TestAnthropic"] 69f806f7_a8b4_de7d_49ff_0b9ba520a407 -->|defined in| d53b6c34_1743_a045_4be1_3554ab153964 0745f78e_a26b_6c71_e909_d8d33715ddd3["test_non_application_json_content_type_for_json_data()"] 0745f78e_a26b_6c71_e909_d8d33715ddd3 -->|calls| 69f806f7_a8b4_de7d_49ff_0b9ba520a407 0745f78e_a26b_6c71_e909_d8d33715ddd3["test_non_application_json_content_type_for_json_data()"] 69f806f7_a8b4_de7d_49ff_0b9ba520a407 -->|calls| 0745f78e_a26b_6c71_e909_d8d33715ddd3 style 69f806f7_a8b4_de7d_49ff_0b9ba520a407 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_client.py lines 667–685
def test_non_application_json_content_type_for_json_data(self, respx_mock: MockRouter, client: Anthropic) -> None:
"""
Response that sets Content-Type to something other than application/json but returns json data
"""
class Model(BaseModel):
foo: int
respx_mock.get("/foo").mock(
return_value=httpx.Response(
200,
content=json.dumps({"foo": 2}),
headers={"Content-Type": "application/text"},
)
)
response = client.get("/foo", cast_to=Model)
assert isinstance(response, Model)
assert response.foo == 2
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_non_application_json_content_type_for_json_data() do?
test_non_application_json_content_type_for_json_data() is a function in the anthropic-sdk-python codebase, defined in tests/test_client.py.
Where is test_non_application_json_content_type_for_json_data() defined?
test_non_application_json_content_type_for_json_data() is defined in tests/test_client.py at line 667.
What does test_non_application_json_content_type_for_json_data() call?
test_non_application_json_content_type_for_json_data() calls 1 function(s): test_non_application_json_content_type_for_json_data.
What calls test_non_application_json_content_type_for_json_data()?
test_non_application_json_content_type_for_json_data() is called by 1 function(s): test_non_application_json_content_type_for_json_data.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free