

def test_response(self):
    'The signal will be disconnected when the request is processed.'
    request = request.factory.get('/')
    request.user = self.user
    self.middleware.process_request(request)
    self.assertTrue(pre_save.has_listeners(LogEntry))
    self.middleware.process_response(request, HttpResponse())
    self.assertFalse(pre_save.has_listeners(LogEntry))

dataset/ETHPy150Open jjkester/django-auditlog/src/auditlog_tests/tests.py MiddlewareTest.test_response/VarMisuse@14/37 `self`->`request`