'Test if HA start and stop events are grouped.
Events that are occuring in the same minute.'

def test_home_assistant_start_stop_grouped(self):

    entries = list(logbook.humanify((ha.Event(EVENT_HOMEASSISTANT_STOP), ha.Event(EVENT_HOMEASSISTANT_START))))
    self.assertEqual(1, len(entries))
    self.assert_entry(entries[0], name='Home    Assistant', message='restarted', domain=ha.DOMAIN)
