Remove loader.get_component (#23111)

* Remove get_component

* Lint
This commit is contained in:
Paulus Schoutsen authored and Jason Hu committed 2019-04-14 22:31:01 -07:00
1 parent 23cb579f9f
commit b0d893afc9
11 files changed
+69 -84

No files matched your search

+1 -2
View File
@@ -3,7 +3,6 @@ import io
import unittest
from homeassistant.setup import setup_component
from homeassistant import loader
from homeassistant.components import light, scene
from homeassistant.util import yaml
@@ -18,7 +17,7 @@ class TestScene(unittest.TestCase):
def setUp(self): # pylint: disable=invalid-name
"""Set up things to be run when tests are started."""
self.hass = get_test_home_assistant()
test_light = loader.get_component(self.hass, 'test.light')
test_light = getattr(self.hass.components, 'test.light')
test_light.init()
assert setup_component(self.hass, light.DOMAIN, {