mirror of
https://github.com/fastapi/fastapi.git
synced 2026-05-18 13:27:45 -04:00
✅ Fix test error in Windows for jsonable_encoder (#9840)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
committed by
GitHub
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():
|
||||
|
||||
Reference in New Issue
Block a user