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:
1 parent
0c0feda834
commit
bbfd86dec3
16 files changed
+62
-46
No files matched your search
@@ -1,10 +1,11 @@
|
||||
"""The tests for the demo hvac."""
|
||||
import unittest
|
||||
|
||||
from homeassistant.bootstrap import setup_component
|
||||
from homeassistant.components import hvac
|
||||
from homeassistant.util.unit_system import (
|
||||
METRIC_SYSTEM,
|
||||
)
|
||||
from homeassistant.components import hvac
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
@@ -19,7 +20,7 @@ class TestDemoHvac(unittest.TestCase):
|
||||
"""Setup things to be run when tests are started."""
|
||||
self.hass = get_test_home_assistant()
|
||||
self.hass.config.units = METRIC_SYSTEM
|
||||
self.assertTrue(hvac.setup(self.hass, {'hvac': {
|
||||
self.assertTrue(setup_component(self.hass, hvac.DOMAIN, {'hvac': {
|
||||
'platform': 'demo',
|
||||
}}))
|
||||
|
||||
|
||||
Reference in new issue
Block a user