mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #20478 – Added support for HTTP PATCH method in generic views.
This commit is contained in:
@@ -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/'))
|
||||
|
||||
Reference in New Issue
Block a user