File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -40,23 +40,11 @@ def test_schema_extra_and_new_param_conflict():
4040 """test that passing schema_extra and new params at the same time raises an error"""
4141
4242 with pytest .raises (RuntimeError ) as excinfo :
43-
44- class ItemA (SQLModel ):
45- name : str = Field (
46- schema_extra = {"legacy" : 1 },
47- json_schema_extra = {"new" : 2 },
48- )
49-
43+ Field (schema_extra = {"legacy" : 1 }, json_schema_extra = {"new" : 2 })
5044 assert "Passing schema_extra is not supported" in str (excinfo .value )
5145
5246 with pytest .raises (RuntimeError ) as excinfo :
53-
54- class ItemB (SQLModel ):
55- name : str = Field (
56- schema_extra = {"legacy" : 1 },
57- pydantic_kwargs = {"alias" : "Alias" },
58- )
59-
47+ Field (schema_extra = {"legacy" : 1 }, pydantic_kwargs = {"alias" : "Alias" })
6048 assert "Passing schema_extra is not supported" in str (excinfo .value )
6149
6250
You can’t perform that action at this time.
0 commit comments