

def test_exception(self):
    'The signal will be disconnected when an exception is raised.'
    request = self.factory.get('/')
    self.user = self.user
    self.middleware.process_request(request)
    self.assertTrue(pre_save.has_listeners(LogEntry))
    self.middleware.process_exception(request, ValidationError('Test'))
    self.assertFalse(pre_save.has_listeners(LogEntry))

dataset/ETHPy150Open jjkester/django-auditlog/src/auditlog_tests/tests.py MiddlewareTest.test_exception/VarMisuse@23/46 `request`->`self`