Skip to content

Commit bbfdef0

Browse files
committed
Add test for schema consistency
1 parent 7056670 commit bbfdef0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_geometries.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,13 @@ def test_parse_geometry_obj_point():
339339
)
340340

341341

342+
def test_schema():
343+
"""Test to check that the schema is the same for validation and serialization"""
344+
assert Point.model_json_schema(mode="validation") == Point.model_json_schema(
345+
mode="serialization"
346+
)
347+
348+
342349
def test_parse_geometry_obj_multi_point():
343350
assert parse_geometry_obj(
344351
{"type": "MultiPoint", "coordinates": [[100.0, 0.0], [101.0, 1.0]]}

0 commit comments

Comments
 (0)