Ejemplo n.º 1
0
    def test_noack(self):
        """Test no ack feature."""
        entity = alert.Alert(self.hass, *TEST_NOACK)
        self.hass.async_add_job(entity.begin_alerting)
        self.hass.block_till_done()

        self.assertEqual(True, entity.hidden)
Ejemplo n.º 2
0
async def test_done_message_state_tracker_reset_on_cancel(hass):
    """Test that the done message is reset when canceled."""
    entity = alert.Alert(hass, *TEST_NOACK)
    entity._cancel = lambda *args: None
    assert entity._send_done_message is False
    entity._send_done_message = True
    hass.async_add_job(entity.end_alerting)
    await hass.async_block_till_done()
    assert entity._send_done_message is False
Ejemplo n.º 3
0
async def test_noack(hass):
    """Test no ack feature."""
    entity = alert.Alert(hass, *TEST_NOACK)
    hass.async_add_job(entity.begin_alerting)
    await hass.async_block_till_done()
Ejemplo n.º 4
0
 def test_noack(self):
     """Test no ack feature."""
     entity = alert.Alert(self.hass, *TEST_NOACK)
     self.hass.add_job(entity.begin_alerting)
     self.hass.block_till_done()