summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-12-12 16:08:45 -0500
committerTim Graham <timograham@gmail.com>2014-12-12 16:14:10 -0500
commitdf9f2e41fae68e2079db61e07569fdc89d1d6343 (patch)
treeffaf885eef56efe635a9fc84905a6ad29c5912d5 /tests
parentc72eb80d114fb5d90bd21b5549e8abd0bbd17f99 (diff)
Refs #23943 -- Removed an invalid generic_views test.
Using PUT as a method for the form element is no longer supported as described in the ticket.
Diffstat (limited to 'tests')
-rw-r--r--tests/generic_views/test_edit.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/generic_views/test_edit.py b/tests/generic_views/test_edit.py
index 5773730bf1..d8e0193574 100644
--- a/tests/generic_views/test_edit.py
+++ b/tests/generic_views/test_edit.py
@@ -1,6 +1,5 @@
from __future__ import unicode_literals
-from unittest import expectedFailure
import warnings
from django.core.exceptions import ImproperlyConfigured
@@ -242,26 +241,6 @@ class UpdateViewTests(TestCase):
self.assertRedirects(res, 'http://testserver/list/authors/')
self.assertQuerysetEqual(Author.objects.all(), ['<Author: Randall Munroe (xkcd)>'])
- @expectedFailure
- def test_update_put(self):
- a = Author.objects.create(
- name='Randall Munroe',
- slug='randall-munroe',
- )
- res = self.client.get('/edit/author/%d/update/' % a.pk)
- self.assertEqual(res.status_code, 200)
- self.assertTemplateUsed(res, 'generic_views/author_form.html')
-
- 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(), ['<Author: Randall Munroe (author of xkcd)>'])
-
def test_update_invalid(self):
a = Author.objects.create(
name='Randall Munroe',