mirror of
https://github.com/django/django.git
synced 2025-11-02 04:48:33 +00:00
Fixed #20478 – Added support for HTTP PATCH method in generic views.
This commit is contained in:
parent
0e51d8eb66
commit
ee8b810b97
4 changed files with 14 additions and 2 deletions
|
|
@ -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/'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue