Fixed #26911 -- Removed NoReverseMatch silencing in RedirectView.

This commit is contained in:
Grzegorz Tężycki 2017-02-28 20:07:57 +01:00 committed by Tim Graham
parent 2863e79a5c
commit fede65260a
3 changed files with 5 additions and 10 deletions

View file

@ -407,11 +407,6 @@ class RedirectViewTest(SimpleTestCase):
self.assertEqual(response.status_code, 302)
self.assertEqual(response['Location'], '/detail/artist/1/')
def test_wrong_named_url_pattern(self):
"A wrong pattern name returns 410 GONE"
response = RedirectView.as_view(pattern_name='wrong.pattern_name')(self.rf.get('/foo/'))
self.assertEqual(response.status_code, 410)
def test_redirect_POST(self):
"Default is a temporary redirect"
response = RedirectView.as_view(url='/bar/')(self.rf.post('/foo/'))