@@ -688,7 +688,7 @@ def test_post_birds(self, spec, spec_dict):
688
688
"healthy" : pet_healthy ,
689
689
},
690
690
}
691
- data = json .dumps (data_json )
691
+ data = json .dumps (data_json ). encode ()
692
692
headers = {
693
693
"api-key" : self .api_key_encoded ,
694
694
}
@@ -770,7 +770,7 @@ def test_post_cats(self, spec, spec_dict):
770
770
},
771
771
"extra" : None ,
772
772
}
773
- data = json .dumps (data_json )
773
+ data = json .dumps (data_json ). encode ()
774
774
headers = {
775
775
"api-key" : self .api_key_encoded ,
776
776
}
@@ -841,7 +841,7 @@ def test_post_cats_boolean_string(self, spec, spec_dict):
841
841
"healthy" : pet_healthy ,
842
842
},
843
843
}
844
- data = json .dumps (data_json )
844
+ data = json .dumps (data_json ). encode ()
845
845
headers = {
846
846
"api-key" : self .api_key_encoded ,
847
847
}
@@ -915,7 +915,7 @@ def test_post_urlencoded(self, spec, spec_dict):
915
915
"healthy" : pet_healthy ,
916
916
},
917
917
}
918
- data = urlencode (data_json )
918
+ data = urlencode (data_json ). encode ()
919
919
headers = {
920
920
"api-key" : self .api_key_encoded ,
921
921
}
@@ -985,7 +985,7 @@ def test_post_no_one_of_schema(self, spec):
985
985
"name" : pet_name ,
986
986
"alias" : alias ,
987
987
}
988
- data = json .dumps (data_json )
988
+ data = json .dumps (data_json ). encode ()
989
989
headers = {
990
990
"api-key" : self .api_key_encoded ,
991
991
}
@@ -1037,7 +1037,7 @@ def test_post_cats_only_required_body(self, spec, spec_dict):
1037
1037
"healthy" : pet_healthy ,
1038
1038
},
1039
1039
}
1040
- data = json .dumps (data_json )
1040
+ data = json .dumps (data_json ). encode ()
1041
1041
headers = {
1042
1042
"api-key" : self .api_key_encoded ,
1043
1043
}
@@ -1088,7 +1088,7 @@ def test_post_pets_raises_invalid_mimetype(self, spec):
1088
1088
"name" : "Cat" ,
1089
1089
"tag" : "cats" ,
1090
1090
}
1091
- data = json .dumps (data_json )
1091
+ data = json .dumps (data_json ). encode ()
1092
1092
headers = {
1093
1093
"api-key" : self .api_key_encoded ,
1094
1094
}
@@ -1141,7 +1141,7 @@ def test_post_pets_missing_cookie(self, spec, spec_dict):
1141
1141
"healthy" : pet_healthy ,
1142
1142
},
1143
1143
}
1144
- data = json .dumps (data_json )
1144
+ data = json .dumps (data_json ). encode ()
1145
1145
headers = {
1146
1146
"api-key" : self .api_key_encoded ,
1147
1147
}
@@ -1184,7 +1184,7 @@ def test_post_pets_missing_header(self, spec, spec_dict):
1184
1184
"healthy" : pet_healthy ,
1185
1185
},
1186
1186
}
1187
- data = json .dumps (data_json )
1187
+ data = json .dumps (data_json ). encode ()
1188
1188
cookies = {
1189
1189
"user" : "123" ,
1190
1190
}
@@ -1223,7 +1223,7 @@ def test_post_pets_raises_invalid_server_error(self, spec):
1223
1223
"name" : "Cat" ,
1224
1224
"tag" : "cats" ,
1225
1225
}
1226
- data = json .dumps (data_json )
1226
+ data = json .dumps (data_json ). encode ()
1227
1227
headers = {
1228
1228
"api-key" : "12345" ,
1229
1229
}
@@ -1509,7 +1509,7 @@ def test_post_tags_extra_body_properties(self, spec):
1509
1509
"name" : pet_name ,
1510
1510
"alias" : alias ,
1511
1511
}
1512
- data = json .dumps (data_json )
1512
+ data = json .dumps (data_json ). encode ()
1513
1513
1514
1514
request = MockRequest (
1515
1515
host_url ,
@@ -1539,7 +1539,7 @@ def test_post_tags_empty_body(self, spec):
1539
1539
host_url = "http://petstore.swagger.io/v1"
1540
1540
path_pattern = "/v1/tags"
1541
1541
data_json = {}
1542
- data = json .dumps (data_json )
1542
+ data = json .dumps (data_json ). encode ()
1543
1543
1544
1544
request = MockRequest (
1545
1545
host_url ,
@@ -1569,7 +1569,7 @@ def test_post_tags_wrong_property_type(self, spec):
1569
1569
host_url = "http://petstore.swagger.io/v1"
1570
1570
path_pattern = "/v1/tags"
1571
1571
tag_name = 123
1572
- data = json .dumps (tag_name )
1572
+ data = json .dumps (tag_name ). encode ()
1573
1573
1574
1574
request = MockRequest (
1575
1575
host_url ,
@@ -1602,7 +1602,7 @@ def test_post_tags_additional_properties(self, spec):
1602
1602
data_json = {
1603
1603
"name" : pet_name ,
1604
1604
}
1605
- data = json .dumps (data_json )
1605
+ data = json .dumps (data_json ). encode ()
1606
1606
1607
1607
request = MockRequest (
1608
1608
host_url ,
@@ -1658,7 +1658,7 @@ def test_post_tags_created_now(self, spec):
1658
1658
"created" : created ,
1659
1659
"name" : pet_name ,
1660
1660
}
1661
- data = json .dumps (data_json )
1661
+ data = json .dumps (data_json ). encode ()
1662
1662
1663
1663
request = MockRequest (
1664
1664
host_url ,
@@ -1715,7 +1715,7 @@ def test_post_tags_created_datetime(self, spec):
1715
1715
"created" : created ,
1716
1716
"name" : pet_name ,
1717
1717
}
1718
- data = json .dumps (data_json )
1718
+ data = json .dumps (data_json ). encode ()
1719
1719
1720
1720
request = MockRequest (
1721
1721
host_url ,
@@ -1787,7 +1787,7 @@ def test_post_tags_urlencoded(self, spec):
1787
1787
"created" : created ,
1788
1788
"name" : pet_name ,
1789
1789
}
1790
- data = urlencode (data_json )
1790
+ data = urlencode (data_json ). encode ()
1791
1791
content_type = "application/x-www-form-urlencoded"
1792
1792
1793
1793
request = MockRequest (
@@ -1861,7 +1861,7 @@ def test_post_tags_created_invalid_type(self, spec):
1861
1861
"created" : created ,
1862
1862
"name" : pet_name ,
1863
1863
}
1864
- data = json .dumps (data_json )
1864
+ data = json .dumps (data_json ). encode ()
1865
1865
1866
1866
request = MockRequest (
1867
1867
host_url ,
@@ -1918,7 +1918,7 @@ def test_delete_tags_with_requestbody(self, spec):
1918
1918
data_json = {
1919
1919
"ids" : ids ,
1920
1920
}
1921
- data = json .dumps (data_json )
1921
+ data = json .dumps (data_json ). encode ()
1922
1922
request = MockRequest (
1923
1923
host_url ,
1924
1924
"DELETE" ,
0 commit comments