22from types import ModuleType
33
44import pytest
5- from dirty_equals import IsDict
65from fastapi .testclient import TestClient
76from sqlmodel import create_engine
87from sqlmodel .pool import StaticPool
@@ -300,16 +299,10 @@ def test_tutorial(module: ModuleType):
300299 "properties" : {
301300 "name" : {"title" : "Name" , "type" : "string" },
302301 "secret_name" : {"title" : "Secret Name" , "type" : "string" },
303- "age" : IsDict (
304- {
305- "title" : "Age" ,
306- "anyOf" : [{"type" : "integer" }, {"type" : "null" }],
307- }
308- )
309- | IsDict (
310- # TODO: remove when deprecating Pydantic v1
311- {"title" : "Age" , "type" : "integer" }
312- ),
302+ "age" : {
303+ "title" : "Age" ,
304+ "anyOf" : [{"type" : "integer" }, {"type" : "null" }],
305+ },
313306 },
314307 },
315308 "HeroPublic" : {
@@ -319,53 +312,29 @@ def test_tutorial(module: ModuleType):
319312 "properties" : {
320313 "name" : {"title" : "Name" , "type" : "string" },
321314 "secret_name" : {"title" : "Secret Name" , "type" : "string" },
322- "age" : IsDict (
323- {
324- "title" : "Age" ,
325- "anyOf" : [{"type" : "integer" }, {"type" : "null" }],
326- }
327- )
328- | IsDict (
329- # TODO: remove when deprecating Pydantic v1
330- {"title" : "Age" , "type" : "integer" }
331- ),
315+ "age" : {
316+ "title" : "Age" ,
317+ "anyOf" : [{"type" : "integer" }, {"type" : "null" }],
318+ },
332319 "id" : {"title" : "Id" , "type" : "integer" },
333320 },
334321 },
335322 "HeroUpdate" : {
336323 "title" : "HeroUpdate" ,
337324 "type" : "object" ,
338325 "properties" : {
339- "name" : IsDict (
340- {
341- "title" : "Name" ,
342- "anyOf" : [{"type" : "string" }, {"type" : "null" }],
343- }
344- )
345- | IsDict (
346- # TODO: remove when deprecating Pydantic v1
347- {"title" : "Name" , "type" : "string" }
348- ),
349- "secret_name" : IsDict (
350- {
351- "title" : "Secret Name" ,
352- "anyOf" : [{"type" : "string" }, {"type" : "null" }],
353- }
354- )
355- | IsDict (
356- # TODO: remove when deprecating Pydantic v1
357- {"title" : "Secret Name" , "type" : "string" }
358- ),
359- "age" : IsDict (
360- {
361- "title" : "Age" ,
362- "anyOf" : [{"type" : "integer" }, {"type" : "null" }],
363- }
364- )
365- | IsDict (
366- # TODO: remove when deprecating Pydantic v1
367- {"title" : "Age" , "type" : "integer" }
368- ),
326+ "name" : {
327+ "title" : "Name" ,
328+ "anyOf" : [{"type" : "string" }, {"type" : "null" }],
329+ },
330+ "secret_name" : {
331+ "title" : "Secret Name" ,
332+ "anyOf" : [{"type" : "string" }, {"type" : "null" }],
333+ },
334+ "age" : {
335+ "title" : "Age" ,
336+ "anyOf" : [{"type" : "integer" }, {"type" : "null" }],
337+ },
369338 },
370339 },
371340 "ValidationError" : {
0 commit comments