'Test is_on method.'

def test_is_on(self):

    self.hass.states.set(ENTITY_ID, STATE_ON)
    self.hass.block_till_done()
    self.assertTrue(alert.is_on(self.hass, ENTITY_ID))
    self.hass.states.set(ENTITY_ID, STATE_OFF)
    self.hass.block_till_done()
    self.assertFalse(alert.is_on(self.hass, ENTITY_ID))
