test_pydantic_model_with_default_values() — anthropic-sdk-python Function Reference
Architecture documentation for the test_pydantic_model_with_default_values() function in test_json.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 63f1d071_5828_f653_2a12_193d9440ba5e["test_pydantic_model_with_default_values()"] daa75f9a_3892_38ac_4897_b274c540a548["TestOpenapiDumps"] 63f1d071_5828_f653_2a12_193d9440ba5e -->|defined in| daa75f9a_3892_38ac_4897_b274c540a548 style 63f1d071_5828_f653_2a12_193d9440ba5e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_utils/test_json.py lines 35–45
def test_pydantic_model_with_default_values(self) -> None:
class User(pydantic.BaseModel):
name: str
role: str = "user"
active: bool = True
score: int = 0
model_instance = User(name="Alice")
data = {"model": model_instance}
json_bytes = openapi_dumps(data)
assert json_bytes == b'{"model":{"name":"Alice"}}'
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_pydantic_model_with_default_values() do?
test_pydantic_model_with_default_values() is a function in the anthropic-sdk-python codebase, defined in tests/test_utils/test_json.py.
Where is test_pydantic_model_with_default_values() defined?
test_pydantic_model_with_default_values() is defined in tests/test_utils/test_json.py at line 35.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free