@@ -43,6 +43,7 @@ async def test_tags_color_missing(mocked_api: MockRouter) -> None:
4343 "loc" : ("tags" , 0 , "color" ),
4444 "msg" : "字段不存在" ,
4545 "input" : {"label" : "test" },
46+ "url" : "https://errors.pydantic.dev/2.12/v/missing" ,
4647 }
4748 )
4849 ]
@@ -134,6 +135,7 @@ async def test_tags_label_invalid(mocked_api: MockRouter) -> None:
134135 "msg" : "字符串长度不能超过 10 个字符" ,
135136 "input" : "12345678901" ,
136137 "ctx" : {"max_length" : 10 },
138+ "url" : "https://errors.pydantic.dev/2.12/v/string_too_long" ,
137139 }
138140 )
139141 ]
@@ -192,6 +194,7 @@ async def test_tags_number_invalid(mocked_api: MockRouter) -> None:
192194 {"label" : "4" , "color" : "#ffffff" },
193195 ],
194196 "ctx" : {"field_type" : "List" , "max_length" : 3 , "actual_length" : 4 },
197+ "url" : "https://errors.pydantic.dev/2.12/v/too_long" ,
195198 }
196199 )
197200 ]
@@ -284,6 +287,7 @@ async def test_tags_json_not_list(mocked_api: MockRouter) -> None:
284287 "loc" : ("tags" ,),
285288 "msg" : "值不是合法的列表" ,
286289 "input" : {"test" : "test" },
290+ "url" : "https://errors.pydantic.dev/2.12/v/list_type" ,
287291 }
288292 )
289293 ]
@@ -330,6 +334,7 @@ async def test_tags_json_not_dict(mocked_api: MockRouter) -> None:
330334 "msg" : "值不是合法的字典" ,
331335 "input" : "1" ,
332336 "ctx" : {"class_name" : "Tag" },
337+ "url" : "https://errors.pydantic.dev/2.12/v/model_type" ,
333338 }
334339 )
335340 ]
0 commit comments