MCPcopy
hub / github.com/pydantic/pydantic / test_uuid_json

Function test_uuid_json

pydantic-core/tests/serializers/test_uuid.py:53–56  ·  view source on GitHub ↗
(value, expected)

Source from the content-addressed store, hash-verified

51 ],
52)
53def test_uuid_json(value, expected):
54 v = SchemaSerializer(core_schema.uuid_schema())
55 assert v.to_python(value, mode='json') == expected
56 assert v.to_json(value).decode() == f'"{expected}"'
57
58
59def test_any_uuid_key():

Callers

nothing calls this directly

Calls 2

uuid_schemaMethod · 0.80
decodeMethod · 0.45

Tested by

no test coverage detected