File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -570,8 +570,8 @@ def _not_allowed_in_both_specs(self):
570570 "containers_allowed_outgoing_internet" ,
571571 "containers_allowed_outgoing_permit_list" ,
572572 }
573- if match_keys & set (self .model_fields ) != match_keys :
574- err_msg = f"Expected the following keys { match_keys } to be present { self .model_fields = } "
573+ if match_keys & set (self .__class__ . model_fields ) != match_keys :
574+ err_msg = f"Expected the following keys { match_keys } to be present { self .__class__ . model_fields = } "
575575 raise ValueError (err_msg )
576576
577577 if (
Original file line number Diff line number Diff line change 1- """ This test suite does not intend to re-test pydantic but rather
1+ """This test suite does not intend to re-test pydantic but rather
22check some "corner cases" or critical setups with pydantic model such that:
33
44- we can ensure a given behaviour is preserved through updates
@@ -120,7 +120,7 @@ class Func(BaseModel):
120120 {"$ref" : "#/$defs/DatCoreFileLink" },
121121 {"$ref" : "#/$defs/DownloadLink" },
122122 {"type" : "array" , "items" : {}},
123- {"type" : "object" },
123+ {"additionalProperties" : True , " type" : "object" },
124124 ],
125125 }
126126
@@ -183,7 +183,9 @@ def test_nullable_fields_from_pydantic_v1():
183183 # SEE https://github.com/ITISFoundation/osparc-simcore/pull/6751
184184 class MyModel (BaseModel ):
185185 # pydanticv1 would add a default to fields set as nullable
186- nullable_required : str | None # <--- This was default to =None in pydantic 1 !!!
186+ nullable_required : (
187+ str | None
188+ ) # <--- This was default to =None in pydantic 1 !!!
187189 nullable_required_with_hyphen : str | None = Field (default = ...)
188190 nullable_optional : str | None = None
189191
You can’t perform that action at this time.
0 commit comments