def test_default_content_type(self, req, includes): del req["headers"]["Content-Type"] args = get_request_args(req, includes) assert args["headers"]["content-type"] == "application/json"
def test_file_and_data_fails(self, req, includes): """Can't send json/form data and files at once""" req["files"] = ["abc"] with pytest.raises(exceptions.BadSchemaError): get_request_args(req, includes)
def test_no_override_method(self, req, includes): req["method"] = "POST" args = get_request_args(req, includes) assert args["method"] == "POST"
def test_array_substitution(self, req, includes): args = get_request_args(req, includes) assert args['data']['array'] == ['def456', 'def456']