def test_direct_instantiation(self):
        view = RedirectView()
        response = view.dispatch(self.rf.head('/foo/'))
        self.assertEqual(response.status_code, 410)
It should be possible to use the view without going through .as_view()
dataset/ETHPy150Open django/django/tests/generic_views/test_base.py/RedirectViewTest.test_direct_instantiation