Skip to content

Commit 87c80ba

Browse files
committed
fix - pydantic 2.11 model_fields deprecation
pydantic.warnings.PydanticDeprecatedSince211: Accessing the 'model_fields' attribute on the instance is deprecated. Instead, you should access this attribute from the model class. Deprecated in Pydantic V2.11 to be removed in V3.0.
1 parent 2c1d42f commit 87c80ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/schema_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_schema_without_properties(httpx_mock):
5252
# the schema without properties did get its own named type defined
5353
assert type(result.no_properties).__name__ == "has_no_properties"
5454
# and it has no fields
55-
assert len(result.no_properties.model_fields) == 0
55+
assert len(type(result.no_properties).model_fields) == 0
5656

5757

5858
def test_schema_anyof(with_schema_oneOf_properties):

0 commit comments

Comments
 (0)