summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKrzysztof Jurewicz <krzysztof.jurewicz@laboratorium.ee>2013-05-21 18:01:29 +0200
committerKrzysztof Jurewicz <krzysztof.jurewicz@laboratorium.ee>2013-05-22 14:48:11 +0200
commitee8b810b977572e39dc6acf4d13cc5e05f4d65ee (patch)
treea677838603c8b187867192871de4993f4e9c5345 /tests
parent0e51d8eb66121b2558a38c9f4e366df781046873 (diff)
Fixed #20478 – Added support for HTTP PATCH method in generic views.
Diffstat (limited to 'tests')
-rw-r--r--tests/generic_views/test_base.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/generic_views/test_base.py b/tests/generic_views/test_base.py
index 9080015f4f..ffd9b1b480 100644
--- a/tests/generic_views/test_base.py
+++ b/tests/generic_views/test_base.py
@@ -384,6 +384,12 @@ class RedirectViewTest(unittest.TestCase):
self.assertEqual(response.status_code, 301)
self.assertEqual(response.url, '/bar/')
+ def test_redirect_PATCH(self):
+ "Default is a permanent redirect"
+ response = RedirectView.as_view(url='/bar/')(self.rf.patch('/foo/'))
+ self.assertEqual(response.status_code, 301)
+ self.assertEqual(response.url, '/bar/')
+
def test_redirect_DELETE(self):
"Default is a permanent redirect"
response = RedirectView.as_view(url='/bar/')(self.rf.delete('/foo/'))