@@ -50,8 +50,8 @@ class MyModel:
5050@pytest .mark .parametrize (
5151 'schema_extra_behavior,validate_fn_extra_kw' ,
5252 [
53- ({ 'extra_behavior' : ' allow'} , None ),
54- ({ 'extra_behavior' : ' ignore'} , 'allow' ),
53+ (' allow' , None ),
54+ (' ignore' , 'allow' ),
5555 ],
5656)
5757def test_model_class_extra (schema_extra_behavior : dict [str , Any ], validate_fn_extra_kw : Union [ExtraBehavior , None ]):
@@ -69,7 +69,7 @@ class MyModel:
6969 'field_a' : core_schema .model_field (core_schema .str_schema ()),
7070 'field_b' : core_schema .model_field (core_schema .int_schema ()),
7171 },
72- ** schema_extra_behavior ,
72+ extra_behavior = schema_extra_behavior ,
7373 ),
7474 )
7575 )
@@ -85,8 +85,8 @@ class MyModel:
8585@pytest .mark .parametrize (
8686 'schema_extra_behavior,validate_fn_extra_kw' ,
8787 [
88- ({ 'extra_behavior' : ' forbid'} , None ),
89- ({ 'extra_behavior' : ' ignore'} , 'forbid' ),
88+ (' forbid' , None ),
89+ (' ignore' , 'forbid' ),
9090 ],
9191)
9292def test_model_class_extra_forbid (
@@ -119,7 +119,7 @@ def __getattr__(self, key):
119119 'field_a' : core_schema .model_field (core_schema .str_schema ()),
120120 'field_b' : core_schema .model_field (core_schema .int_schema ()),
121121 },
122- ** schema_extra_behavior ,
122+ extra_behavior = schema_extra_behavior ,
123123 ),
124124 )
125125 )
0 commit comments