test_iso8601_datetime() — anthropic-sdk-python Function Reference
Architecture documentation for the test_iso8601_datetime() function in test_models.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 4a967e2f_bc65_d710_f413_6788ca2e31e3["test_iso8601_datetime()"] 7872e60b_4210_5600_119f_c5d08c52091e["test_models.py"] 4a967e2f_bc65_d710_f413_6788ca2e31e3 -->|defined in| 7872e60b_4210_5600_119f_c5d08c52091e style 4a967e2f_bc65_d710_f413_6788ca2e31e3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_models.py lines 423–440
def test_iso8601_datetime() -> None:
class Model(BaseModel):
created_at: datetime
expected = datetime(2019, 12, 27, 18, 11, 19, 117000, tzinfo=timezone.utc)
if PYDANTIC_V1:
expected_json = '{"created_at": "2019-12-27T18:11:19.117000+00:00"}'
else:
expected_json = '{"created_at":"2019-12-27T18:11:19.117000Z"}'
model = Model.construct(created_at="2019-12-27T18:11:19.117Z")
assert model.created_at == expected
assert model_json(model) == expected_json
model = parse_obj(Model, dict(created_at="2019-12-27T18:11:19.117Z"))
assert model.created_at == expected
assert model_json(model) == expected_json
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_iso8601_datetime() do?
test_iso8601_datetime() is a function in the anthropic-sdk-python codebase, defined in tests/test_models.py.
Where is test_iso8601_datetime() defined?
test_iso8601_datetime() is defined in tests/test_models.py at line 423.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free