Use setup_component in tests v1 (#3507)
* update unittests like #3414 * setup_component - splunk * setup_component - statsd * fix statsd & splunk unittest config values * component_setup - device_sun_light_trigger * setup_component - introduction * component_setup - persistent_notification * setup_component - logentries, mqtt eventstream * fix unittest logentries
This commit is contained in:
parent
0c0feda834
commit
bbfd86dec3
16 changed files with 62 additions and 46 deletions
|
@ -2,6 +2,7 @@
|
|||
# pylint: disable=too-many-public-methods,protected-access
|
||||
import unittest
|
||||
|
||||
from homeassistant.bootstrap import setup_component
|
||||
import homeassistant.components.light as light
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
@ -15,7 +16,7 @@ class TestDemoClimate(unittest.TestCase):
|
|||
def setUp(self): # pylint: disable=invalid-name
|
||||
"""Setup things to be run when tests are started."""
|
||||
self.hass = get_test_home_assistant()
|
||||
self.assertTrue(light.setup(self.hass, {'light': {
|
||||
self.assertTrue(setup_component(self.hass, light.DOMAIN, {'light': {
|
||||
'platform': 'demo',
|
||||
}}))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue