mirror of https://github.com/tiangolo/fastapi.git
✅ Fix test error in Windows for `jsonable_encoder` (#9840)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
parent
2d8a776836
commit
37818f553d
|
|
@ -247,8 +247,9 @@ def test_encode_model_with_pure_path():
|
|||
class Config:
|
||||
arbitrary_types_allowed = True
|
||||
|
||||
obj = ModelWithPath(path=PurePath("/foo", "bar"))
|
||||
assert jsonable_encoder(obj) == {"path": "/foo/bar"}
|
||||
test_path = PurePath("/foo", "bar")
|
||||
obj = ModelWithPath(path=test_path)
|
||||
assert jsonable_encoder(obj) == {"path": str(test_path)}
|
||||
|
||||
|
||||
def test_encode_model_with_pure_posix_path():
|
||||
|
|
|
|||
Loading…
Reference in New Issue