def test_resource_not_found_on_put(self): resource_id = self.create_resource() self.delete_resource(resource_id) error = e.not_found(resource=self.resource) response = client.put(self.generate_url(resource_id), param='param') response.assert_match(404, error)
def test_resource_not_found_on_put(self): resource_id = self.create_resource() self.delete_resource(resource_id) error = e.not_found(resource=self.resource) response = client.put(self.generate_url(resource_id), {'param': 'param'}) response.assert_match(404, error)
def check_bogus_field_on_put(self, url, bogus_field): field, value, expected_type = bogus_field error = e.wrong_type(field=field, type=expected_type) response = client.put(url, {field: value}) response.assert_match(400, error)
def test_unknown_parameter_on_put(self): with self.generated_url() as url: error = e.unknown_parameters('invalid') response = client.put(url, invalid='invalidvalue') response.assert_match(400, error)
def test_unknown_parameter_on_put(self): with self.generated_url() as url: error = e.unknown_parameters('invalid') response = client.put(url, {'invalid': 'invalidvalue'}) response.assert_match(400, error)