summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2013-05-22 17:19:43 -0700
committerRussell Keith-Magee <russell@keith-magee.com>2013-05-22 17:19:43 -0700
commit11b06532f7633478b341c9d1da6d29e9839a4e9a (patch)
tree983c31a4a9cf47c5745dac09cfc0156069360531 /tests
parent51998dffe7ef18d314daf23e8e2ef1e2c0891d32 (diff)
parentee8b810b977572e39dc6acf4d13cc5e05f4d65ee (diff)
Merge pull request #1198 from KrzysiekJ/http-patch-method
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/'))