diff --git a/tests/regressiontests/generic_views/edit.py b/tests/regressiontests/generic_views/edit.py index 182615a86b..2bd982e3d9 100644 --- a/tests/regressiontests/generic_views/edit.py +++ b/tests/regressiontests/generic_views/edit.py @@ -126,6 +126,10 @@ class UpdateViewTests(TestCase): res = self.client.put('/edit/author/%d/update/' % a.pk, {'name': 'Randall Munroe (author of xkcd)', 'slug': 'randall-munroe'}) + # Here is the expected failure. PUT data are not processed in any special + # way by django. So the request will equal to a POST without data, hence + # the form will be invalid and redisplayed with errors (status code 200). + # See also #12635 self.assertEqual(res.status_code, 302) self.assertRedirects(res, 'http://testserver/list/authors/') self.assertQuerysetEqual(Author.objects.all(), [''])