def test_send_lockout_signal(self):
        class Scope(object): pass  # this "hack" is needed so we don't have to use global variables or python3 features
        scope = Scope()
        scope.signal_received = 0

        def signal_handler(request, username, ip_address, *args, **kwargs):
            scope.signal_received += 1
            self.assertIsNotNone(request)

        # Connect signal handler
        user_locked_out.connect(signal_handler)

        # Make a lockout
        self.test_failure_limit_once()
        self.assertEquals(scope.signal_received, 1)

        reset()

        # Make another lockout
        self.test_failure_limit_once()
        self.assertEquals(scope.signal_received, 2)
Test if the lockout signal is emitted
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/django-axes-1.4.0/axes/tests.py/AccessAttemptTest.test_send_lockout_signal