Fix tests & lint

This commit is contained in:
Paulus Schoutsen 2019-12-04 22:47:40 -08:00
parent 28e9f1d0b8
commit dad11f8208
14 changed files with 112 additions and 87 deletions

View file

@ -432,6 +432,8 @@ class TestLight(unittest.TestCase):
async def test_light_context(hass, hass_admin_user):
"""Test that light context works."""
platform = getattr(hass.components, "test.light")
platform.init()
assert await async_setup_component(hass, "light", {"light": {"platform": "test"}})
state = hass.states.get("light.ceiling")
@ -453,6 +455,8 @@ async def test_light_context(hass, hass_admin_user):
async def test_light_turn_on_auth(hass, hass_admin_user):
"""Test that light context works."""
platform = getattr(hass.components, "test.light")
platform.init()
assert await async_setup_component(hass, "light", {"light": {"platform": "test"}})
state = hass.states.get("light.ceiling")