

def test_get_with_anonymous(self):
    view = ApplicationDisconnect.as_view()
    url = reverse('admin:app_disconnect', kwargs={
        'app_id': self.app.id,
    })
    request = APIRequestFactory().get(url)
    request.user = AnonymousUser()
    response = view(request, app_id=self.app.id)
    self.assertTrue(isinstance(response, HttpResponseRedirect))
    view.assertIsNotNone(AccessToken.objects.get(pk=self.token.id))

dataset/ETHPy150Open ExCiteS/geokey/geokey/applications/tests/test_views.py ApplicationDisconnectTest.test_get_with_anonymous/VarMisuse@86/110 `self`->`view`