@@ -159,7 +159,7 @@ def test_post_required_header_param_missing(self, client):
159159
160160 def test_post_media_type_invalid (self , client ):
161161 client .cookies .set ("user" , "1" )
162- data = "data"
162+ content = "data"
163163 content_type = "text/html"
164164 headers = {
165165 "Authorization" : "Basic testuser" ,
@@ -168,7 +168,7 @@ def test_post_media_type_invalid(self, client):
168168 }
169169 response = client .post (
170170 "https://staging.gigantic-server.com/v1/pets" ,
171- data = data ,
171+ content = content ,
172172 headers = headers ,
173173 )
174174
@@ -350,35 +350,33 @@ def test_get_valid(self, client):
350350
351351class TestPetPhotoEndpoint (BaseTestPetstore ):
352352 def test_get_valid (self , client , data_gif ):
353+ client .cookies .set ("user" , "1" )
353354 headers = {
354355 "Authorization" : "Basic testuser" ,
355356 "Api-Key" : self .api_key_encoded ,
356357 }
357358
358- cookies = {"user" : "1" }
359359 response = client .get (
360360 "/v1/pets/1/photo" ,
361361 headers = headers ,
362- cookies = cookies ,
363362 )
364363
365364 assert response .content == data_gif
366365 assert response .status_code == 200
367366
368367 def test_post_valid (self , client , data_gif ):
368+ client .cookies .set ("user" , "1" )
369369 content_type = "image/gif"
370370 headers = {
371371 "Authorization" : "Basic testuser" ,
372372 "Api-Key" : self .api_key_encoded ,
373373 "Content-Type" : content_type ,
374374 }
375375
376- cookies = {"user" : "1" }
377376 response = client .post (
378377 "/v1/pets/1/photo" ,
379378 headers = headers ,
380- data = data_gif ,
381- cookies = cookies ,
379+ content = data_gif ,
382380 )
383381
384382 assert not response .text
0 commit comments