Custom component loading cleanup (#14211)

* Clean up custom component loading

* Fix some tests

* Fix some stuff

* Make imports work again

* Fix tests

* Remove debug print

* Lint
This commit is contained in:
Paulus Schoutsen 2018-05-01 14:57:30 -04:00 committed by Pascal Vizeli
parent 5d96751168
commit 83d300fd11
50 changed files with 315 additions and 392 deletions

View file

@ -118,7 +118,7 @@ class TestLight(unittest.TestCase):
def test_services(self):
"""Test the provided services."""
platform = loader.get_component('light.test')
platform = loader.get_component(self.hass, 'light.test')
platform.init()
self.assertTrue(
@ -267,7 +267,7 @@ class TestLight(unittest.TestCase):
def test_broken_light_profiles(self):
"""Test light profiles."""
platform = loader.get_component('light.test')
platform = loader.get_component(self.hass, 'light.test')
platform.init()
user_light_file = self.hass.config.path(light.LIGHT_PROFILES_FILE)
@ -282,7 +282,7 @@ class TestLight(unittest.TestCase):
def test_light_profiles(self):
"""Test light profiles."""
platform = loader.get_component('light.test')
platform = loader.get_component(self.hass, 'light.test')
platform.init()
user_light_file = self.hass.config.path(light.LIGHT_PROFILES_FILE)