(self)
| 166 | self._test_redirect(AView.as_view(), "/accounts/login/") |
| 167 | |
| 168 | def test_raise_exception(self): |
| 169 | class AView(AlwaysFalseView): |
| 170 | raise_exception = True |
| 171 | |
| 172 | request = self.factory.get("/rand") |
| 173 | request.user = AnonymousUser() |
| 174 | with self.assertRaises(PermissionDenied): |
| 175 | AView.as_view()(request) |
| 176 | |
| 177 | def test_raise_exception_custom_message(self): |
| 178 | msg = "You don't have access here" |
nothing calls this directly
no test coverage detected