

@raises(AccessToken.DoesNotExist)
def test_get_with_user(self):
    view = ApplicationDisconnect.as_view()
    url = reverse('admin:app_disconnect', kwargs={
        'app_id': self.app.id,
    })
    request = APIRequestFactory().get(self)
    from django.contrib.messages.storage.fallback import FallbackStorage
    setattr(request, 'session', 'session')
    messages = FallbackStorage(request)
    setattr(request, '_messages', messages)
    request.user = self.user
    response = view(request, app_id=self.app.id)
    self.assertTrue(isinstance(response, HttpResponseRedirect))
    AccessToken.objects.get(pk=self.token.id)

dataset/ETHPy150Open ExCiteS/geokey/geokey/applications/tests/test_views.py ApplicationDisconnectTest.test_get_with_user/VarMisuse@56/78 `url`->`self`