@@ -159,7 +159,7 @@ def test_post_required_header_param_missing(self, client):
159
159
160
160
def test_post_media_type_invalid (self , client ):
161
161
client .cookies .set ("user" , "1" )
162
- data = "data"
162
+ content = "data"
163
163
content_type = "text/html"
164
164
headers = {
165
165
"Authorization" : "Basic testuser" ,
@@ -168,7 +168,7 @@ def test_post_media_type_invalid(self, client):
168
168
}
169
169
response = client .post (
170
170
"https://staging.gigantic-server.com/v1/pets" ,
171
- data = data ,
171
+ content = content ,
172
172
headers = headers ,
173
173
)
174
174
@@ -350,35 +350,33 @@ def test_get_valid(self, client):
350
350
351
351
class TestPetPhotoEndpoint (BaseTestPetstore ):
352
352
def test_get_valid (self , client , data_gif ):
353
+ client .cookies .set ("user" , "1" )
353
354
headers = {
354
355
"Authorization" : "Basic testuser" ,
355
356
"Api-Key" : self .api_key_encoded ,
356
357
}
357
358
358
- cookies = {"user" : "1" }
359
359
response = client .get (
360
360
"/v1/pets/1/photo" ,
361
361
headers = headers ,
362
- cookies = cookies ,
363
362
)
364
363
365
364
assert response .content == data_gif
366
365
assert response .status_code == 200
367
366
368
367
def test_post_valid (self , client , data_gif ):
368
+ client .cookies .set ("user" , "1" )
369
369
content_type = "image/gif"
370
370
headers = {
371
371
"Authorization" : "Basic testuser" ,
372
372
"Api-Key" : self .api_key_encoded ,
373
373
"Content-Type" : content_type ,
374
374
}
375
375
376
- cookies = {"user" : "1" }
377
376
response = client .post (
378
377
"/v1/pets/1/photo" ,
379
378
headers = headers ,
380
- data = data_gif ,
381
- cookies = cookies ,
379
+ content = data_gif ,
382
380
)
383
381
384
382
assert not response .text
0 commit comments