- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for test_encode_root (0.18 sec)
-
tests/test_jsonable_encoder.py
arbitrary_types_allowed = True obj = ModelWithPath(path=PureWindowsPath("/foo", "bar")) assert jsonable_encoder(obj) == {"path": "\\foo\\bar"} @needs_pydanticv1 def test_encode_root(): class ModelWithRoot(BaseModel): __root__: str model = ModelWithRoot(__root__="Foo") assert jsonable_encoder(model) == "Foo" @needs_pydanticv2
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 9K bytes - Viewed (0)