@@ -123,7 +123,7 @@ def test_get_pets(self, spec):
123
123
data_json = {
124
124
"data" : [],
125
125
}
126
- data = json .dumps (data_json )
126
+ data = json .dumps (data_json ). encode ()
127
127
headers = {
128
128
"Content-Type" : "application/json" ,
129
129
"x-next" : "next-url" ,
@@ -185,7 +185,7 @@ def test_get_pets_response(self, spec):
185
185
}
186
186
],
187
187
}
188
- data = json .dumps (data_json )
188
+ data = json .dumps (data_json ). encode ()
189
189
response = MockResponse (data )
190
190
191
191
response_result = unmarshal_response (request , response , spec = spec )
@@ -286,7 +286,7 @@ def test_get_pets_invalid_response(self, spec, response_unmarshaller):
286
286
}
287
287
],
288
288
}
289
- response_data = json .dumps (response_data_json )
289
+ response_data = json .dumps (response_data_json ). encode ()
290
290
response = MockResponse (response_data )
291
291
292
292
with pytest .raises (InvalidData ) as exc_info :
@@ -349,7 +349,7 @@ def test_get_pets_ids_param(self, spec):
349
349
data_json = {
350
350
"data" : [],
351
351
}
352
- data = json .dumps (data_json )
352
+ data = json .dumps (data_json ). encode ()
353
353
response = MockResponse (data )
354
354
355
355
response_result = unmarshal_response (request , response , spec = spec )
@@ -398,7 +398,7 @@ def test_get_pets_tags_param(self, spec):
398
398
data_json = {
399
399
"data" : [],
400
400
}
401
- data = json .dumps (data_json )
401
+ data = json .dumps (data_json ). encode ()
402
402
response = MockResponse (data )
403
403
404
404
response_result = unmarshal_response (request , response , spec = spec )
@@ -1267,7 +1267,7 @@ def test_post_pets_raises_invalid_server_error(self, spec):
1267
1267
},
1268
1268
},
1269
1269
}
1270
- data = json .dumps (data_json )
1270
+ data = json .dumps (data_json ). encode ()
1271
1271
response = MockResponse (data )
1272
1272
1273
1273
with pytest .raises (ServerNotFound ):
@@ -1362,7 +1362,7 @@ def test_get_pet(self, spec):
1362
1362
},
1363
1363
},
1364
1364
}
1365
- data = json .dumps (data_json )
1365
+ data = json .dumps (data_json ). encode ()
1366
1366
response = MockResponse (data )
1367
1367
1368
1368
response_result = unmarshal_response (request , response , spec = spec )
@@ -1413,7 +1413,7 @@ def test_get_pet_not_found(self, spec):
1413
1413
"message" : message ,
1414
1414
"rootCause" : rootCause ,
1415
1415
}
1416
- data = json .dumps (data_json )
1416
+ data = json .dumps (data_json ). encode ()
1417
1417
response = MockResponse (data , status_code = 404 )
1418
1418
1419
1419
response_result = unmarshal_response (request , response , spec = spec )
@@ -1492,7 +1492,7 @@ def test_get_tags(self, spec):
1492
1492
assert result .body is None
1493
1493
1494
1494
data_json = ["cats" , "birds" ]
1495
- data = json .dumps (data_json )
1495
+ data = json .dumps (data_json ). encode ()
1496
1496
response = MockResponse (data )
1497
1497
1498
1498
response_result = unmarshal_response (request , response , spec = spec )
@@ -1637,7 +1637,7 @@ def test_post_tags_additional_properties(self, spec):
1637
1637
"rootCause" : rootCause ,
1638
1638
"additionalinfo" : additionalinfo ,
1639
1639
}
1640
- data = json .dumps (data_json )
1640
+ data = json .dumps (data_json ). encode ()
1641
1641
response = MockResponse (data , status_code = 404 )
1642
1642
1643
1643
response_result = unmarshal_response (request , response , spec = spec )
@@ -1694,7 +1694,7 @@ def test_post_tags_created_now(self, spec):
1694
1694
"rootCause" : "Tag already exist" ,
1695
1695
"additionalinfo" : "Tag Dog already exist" ,
1696
1696
}
1697
- data = json .dumps (data_json )
1697
+ data = json .dumps (data_json ). encode ()
1698
1698
response = MockResponse (data , status_code = 404 )
1699
1699
1700
1700
response_result = unmarshal_response (request , response , spec = spec )
@@ -1753,7 +1753,7 @@ def test_post_tags_created_datetime(self, spec):
1753
1753
"rootCause" : rootCause ,
1754
1754
"additionalinfo" : additionalinfo ,
1755
1755
}
1756
- response_data = json .dumps (response_data_json )
1756
+ response_data = json .dumps (response_data_json ). encode ()
1757
1757
response = MockResponse (response_data , status_code = 404 )
1758
1758
1759
1759
result = unmarshal_response (
@@ -1827,7 +1827,7 @@ def test_post_tags_urlencoded(self, spec):
1827
1827
"rootCause" : rootCause ,
1828
1828
"additionalinfo" : additionalinfo ,
1829
1829
}
1830
- response_data = json .dumps (response_data_json )
1830
+ response_data = json .dumps (response_data_json ). encode ()
1831
1831
response = MockResponse (response_data , status_code = 404 )
1832
1832
1833
1833
result = unmarshal_response (
@@ -1898,7 +1898,7 @@ def test_post_tags_created_invalid_type(self, spec):
1898
1898
"rootCause" : rootCause ,
1899
1899
"additionalinfo" : additionalinfo ,
1900
1900
}
1901
- data = json .dumps (data_json )
1901
+ data = json .dumps (data_json ). encode ()
1902
1902
response = MockResponse (data , status_code = 404 )
1903
1903
1904
1904
response_result = unmarshal_response (request , response , spec = spec )
0 commit comments