def test_wrong_named_url_pattern(self):
        response = RedirectView.as_view(pattern_name='wrong.pattern_name')(self.rf.get('/foo/'))
        self.assertEqual(response.status_code, 410)
A wrong pattern name returns 410 GONE
dataset/ETHPy150Open django/django/tests/generic_views/test_base.py/RedirectViewTest.test_wrong_named_url_pattern