@@ -127,18 +127,18 @@ async def test_model(server, client):
127127
128128def randomPet (client , name = None , cat = False ):
129129 if name :
130- Pet = client .components .schemas ["Pet-Input " ].get_type ()
130+ Pet = client .components .schemas ["Pet" ].get_type ()
131131 if not cat :
132- Dog = typing .get_args (typing . get_args ( Pet .model_fields ["root" ].annotation )[ 0 ] )[1 ]
132+ Dog = typing .get_args (Pet .model_fields ["root" ].annotation )[1 ]
133133 dog = Dog (
134134 name = name ,
135135 age = datetime .timedelta (seconds = random .randint (1 , 2 ** 32 )),
136136 tags = [],
137137 )
138138 pet = Pet (dog )
139139 else :
140- Cat = typing .get_args (typing . get_args ( Pet .model_fields ["root" ].annotation )[ 0 ] )[0 ]
141- WhiteCat = typing .get_args (typing . get_args ( Cat .model_fields ["root" ].annotation )[ 0 ] )[1 ]
140+ Cat = typing .get_args (Pet .model_fields ["root" ].annotation )[0 ]
141+ WhiteCat = typing .get_args (Cat .model_fields ["root" ].annotation )[1 ]
142142 wc = WhiteCat (pet_type = "cat" , color = "white" , name = "whitey" , white_name = "white" )
143143 cat = Cat (wc )
144144 pet = Pet (cat )
@@ -238,8 +238,8 @@ async def test_deletePet(server, client):
238238
239239@pytest .mark .asyncio (loop_scope = "session" )
240240async def test_patchPet (server , client ):
241- Pet = client .components .schemas ["Pet-Input " ].get_type ()
242- Dog = typing .get_args (typing . get_args ( Pet .model_fields ["root" ].annotation )[ 0 ] )[1 ]
241+ Pet = client .components .schemas ["Pet" ].get_type ()
242+ Dog = typing .get_args (Pet .model_fields ["root" ].annotation )[1 ]
243243 pets = [
244244 Pet (
245245 Dog .model_construct (
0 commit comments