Skip to content

Commit

Permalink
disable test for pydantic V1
Browse files Browse the repository at this point in the history
  • Loading branch information
gdlmx committed Sep 5, 2024
1 parent 220d804 commit 4a40b38
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/odm/test_relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,11 +843,12 @@ def test_json_schema_export(self):
if IS_PYDANTIC_V2:
json_schema = DocumentWithListBackLink.model_json_schema()
else:
import json
return # schema does not work in pydantic v1 due to pydantic bug #3390
json_schema = DocumentWithListBackLink.schema()

json_schema = json.loads(DocumentWithListBackLink.schema_json())
assert (
json_schema["properties"]["back_link"]["items"]["type"] == "object"
json_schema["properties"]["back_link"]["items"]
and json_schema["properties"]["back_link"]["type"] == "array"
)


Expand Down

0 comments on commit 4a40b38

Please sign in to comment.