'Test periodic tasks per minute.'

def test_periodic_task_minute(self):

    specific_runs = []
    unsub = track_utc_time_change(self.hass, (lambda x: specific_runs.append(1)), minute='/5')
    self._send_time_changed(datetime(2014, 5, 24, 12, 0, 0))
    self.hass.block_till_done()
    self.assertEqual(1, len(specific_runs))
    self._send_time_changed(datetime(2014, 5, 24, 12, 3, 0))
    self.hass.block_till_done()
    self.assertEqual(1, len(specific_runs))
    self._send_time_changed(datetime(2014, 5, 24, 12, 5, 0))
    self.hass.block_till_done()
    self.assertEqual(2, len(specific_runs))
    unsub()
    self._send_time_changed(datetime(2014, 5, 24, 12, 5, 0))
    self.hass.block_till_done()
    self.assertEqual(2, len(specific_runs))
