'Test if the lockout signal is emitted'

def test_send_lockout_signal(self):

    class Scope(object, ):
        pass
    scope = Scope()
    scope.signal_received = 0
    def signal_handler(request, username, ip_address, *args, **kwargs):
        scope.signal_received += 1
        self.assertIsNotNone(request)
    user_locked_out.connect(signal_handler)
    self.test_failure_limit_once()
    self.assertEquals(scope.signal_received, 1)
    reset()
    self.test_failure_limit_once()
    self.assertEquals(scope.signal_received, 2)
