'Test that throttling actually work.'

def test_call_rate_delay_throttle_enabled(self):

    runs = []
    delay = 5.0
    limit = pilight.CallRateDelayThrottle(self.hass, delay)
    action = limit.limited((lambda x: runs.append(x)))
    for i in range(3):
        action(i)
    self.assertEqual(runs, [])
    exp = []
    now = dt_util.utcnow()
    for i in range(3):
        exp.append(i)
        shifted_time = (now + (timedelta(seconds=(delay + 0.1)) * i))
        self.hass.bus.fire(ha.EVENT_TIME_CHANGED, {ha.ATTR_NOW: shifted_time})
        self.hass.block_till_done()
        self.assertEqual(runs, exp)
