@@ -195,7 +195,7 @@ def test_get_pets_response(self, spec):
195
195
assert response_result .data .data [0 ].id == 1
196
196
assert response_result .data .data [0 ].name == "Cat"
197
197
198
- def test_get_pets_response_no_schema (self , spec ):
198
+ def test_get_pets_response_media_type (self , spec ):
199
199
host_url = "http://petstore.swagger.io/v1"
200
200
path_pattern = "/v1/pets"
201
201
query_params = {
@@ -230,15 +230,15 @@ def test_get_pets_response_no_schema(self, spec):
230
230
231
231
assert result .body is None
232
232
233
- data = b"<html></html>"
233
+ data = b"<html>\xb1 \xbc </html>"
234
234
response = MockResponse (
235
- data , status_code = 404 , mimetype = "text/html; charset=utf-8 "
235
+ data , status_code = 404 , content_type = "text/html; charset=iso-8859-2 "
236
236
)
237
237
238
238
response_result = unmarshal_response (request , response , spec = spec )
239
239
240
240
assert response_result .errors == []
241
- assert response_result .data == data .decode ("utf-8 " )
241
+ assert response_result .data == data .decode ("iso-8859-2 " )
242
242
243
243
def test_get_pets_invalid_response (self , spec , response_unmarshaller ):
244
244
host_url = "http://petstore.swagger.io/v1"
@@ -1015,7 +1015,7 @@ def test_post_pets_raises_invalid_mimetype(self, spec):
1015
1015
"/pets" ,
1016
1016
path_pattern = path_pattern ,
1017
1017
data = data ,
1018
- mimetype = "text/html" ,
1018
+ content_type = "text/html" ,
1019
1019
headers = headers ,
1020
1020
cookies = cookies ,
1021
1021
)
@@ -1150,7 +1150,7 @@ def test_post_pets_raises_invalid_server_error(self, spec):
1150
1150
"/pets" ,
1151
1151
path_pattern = path_pattern ,
1152
1152
data = data ,
1153
- mimetype = "text/html" ,
1153
+ content_type = "text/html" ,
1154
1154
headers = headers ,
1155
1155
cookies = cookies ,
1156
1156
)
@@ -1372,7 +1372,7 @@ def test_get_pet_wildcard(self, spec):
1372
1372
assert result .body is None
1373
1373
1374
1374
data = b"imagedata"
1375
- response = MockResponse (data , mimetype = "image/png" )
1375
+ response = MockResponse (data , content_type = "image/png" )
1376
1376
1377
1377
response_result = unmarshal_response (request , response , spec = spec )
1378
1378
0 commit comments