test that all lights turn off when no entity id is given (#7981)

This commit is contained in:
Thiago Oliveira 2017-06-10 01:13:52 -07:00 committed by Pascal Vizeli
parent f2feabcf0b
commit ba80d5e52a

View File

@ -71,6 +71,15 @@ class TestDemoLight(unittest.TestCase):
self.hass.block_till_done()
self.assertFalse(light.is_on(self.hass, ENTITY_LIGHT))
def test_turn_off_without_entity_id(self):
"""Test light turn off all lights."""
light.turn_on(self.hass, ENTITY_LIGHT)
self.hass.block_till_done()
self.assertTrue(light.is_on(self.hass, ENTITY_LIGHT))
light.turn_off(self.hass)
self.hass.block_till_done()
self.assertFalse(light.is_on(self.hass, ENTITY_LIGHT))
@asyncio.coroutine
def test_restore_state(hass):