MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / test_datetime

Function test_datetime

tests/test_qs.py:27–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26
27def test_datetime() -> None:
28 assert unquote(stringify({"a": datetime(2024, 1, 2, 3, 4, 5)})) == "a=2024-01-02T03:04:05"
29 assert (
30 unquote(stringify({"a": {"gte": datetime(2024, 1, 2, 3, 4, 5, 600, tzinfo=timezone.utc)}}))
31 == "a[gte]=2024-01-02T03:04:05.000600+00:00"
32 )
33 assert unquote(stringify({"a": date(2024, 1, 2)})) == "a=2024-01-02"
34
35
36@pytest.mark.parametrize("method", ["class", "function"])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected