Skip to content

Commit 1615fcb

Browse files
committed
epoch - fix related tests
1 parent 64e1710 commit 1615fcb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/ref_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,23 @@ def test_allOf_resolution(petstore_expanded):
6565
pass
6666
items = pet.model_fields
6767

68-
assert sorted(items.keys()) == ["id", "name", "tag"]
68+
assert sorted(items.keys()) == ["created", "id", "name", "tag"]
6969

7070
def is_nullable(x):
7171
# Optional[…] or | None
7272
return typing.get_origin(x.annotation) == typing.Union and type(None) in typing.get_args(x.annotation)
7373

7474
assert sorted(map(lambda x: x[0], filter(lambda y: is_nullable(y[1]), items.items()))) == sorted(
75-
["tag"]
76-
), ref.schema()
75+
["created", "tag"]
76+
), ref.model_json_schema()
7777

7878
def is_required(x):
7979
# not assign a default '= Field(default=…)' or '= …'
8080
return x.default == pydantic_core.PydanticUndefined
8181

8282
assert sorted(map(lambda x: x[0], filter(lambda y: is_required(y[1]), items.items()))) == sorted(
8383
["id", "name"]
84-
), ref.schema()
84+
), ref.model_json_schema()
8585

8686
assert items["id"].annotation == int
8787
assert items["name"].annotation == str

0 commit comments

Comments
 (0)