From ba80d5e52acaac8c9e968a52878110018087ce6e Mon Sep 17 00:00:00 2001 From: Thiago Oliveira Date: Sat, 10 Jun 2017 01:13:52 -0700 Subject: [PATCH] test that all lights turn off when no entity id is given (#7981) --- tests/components/light/test_demo.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/components/light/test_demo.py b/tests/components/light/test_demo.py index 2d3a752fafa..b4576b174d6 100644 --- a/tests/components/light/test_demo.py +++ b/tests/components/light/test_demo.py @@ -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):