Bootstrap / Component setup async (#6264)
* Bootstrap / Entiy setup async * Cleanup add_job stuff / return task/future object * Address paulus comments / part 1 * fix install pip * Cleanup bootstrap / move config stuff to config.py * Make demo async * Further bootstrap improvement * Address Martin's comments * Fix initial tests * Fix final tests * Fix bug with prepare loader * Remove no longer needed things * Log error when invalid config * More cleanup * Cleanups platform events & fix lint * Use a non blocking add_entities callback for platform * Fix Autoamtion is setup befor entity is ready * Better automation fix * Address paulus comments * Typo * fix lint * rename functions * fix tests * fix test * change exceptions * fix spell
This commit is contained in:
1 parent
383b0914b3
commit
41f558b181
109 files changed
+764
-848
No files matched your search
@@ -17,7 +17,8 @@ from homeassistant.const import (CONF_PLATFORM, CONF_PASSWORD, CONF_USERNAME,
|
||||
CONF_HOST)
|
||||
|
||||
from tests.common import (
|
||||
get_test_home_assistant, get_test_config_dir, assert_setup_component)
|
||||
get_test_home_assistant, get_test_config_dir, assert_setup_component,
|
||||
mock_component)
|
||||
|
||||
FAKEFILE = None
|
||||
|
||||
@@ -43,7 +44,7 @@ class TestComponentsDeviceTrackerASUSWRT(unittest.TestCase):
|
||||
def setup_method(self, _):
|
||||
"""Setup things to be run when tests are started."""
|
||||
self.hass = get_test_home_assistant()
|
||||
self.hass.config.components = set(['zone'])
|
||||
mock_component(self.hass, 'zone')
|
||||
|
||||
def teardown_method(self, _):
|
||||
"""Stop everything that was started."""
|
||||
|
||||
@@ -16,7 +16,8 @@ from homeassistant.components.device_tracker import DOMAIN
|
||||
from homeassistant.util import slugify
|
||||
|
||||
from tests.common import (
|
||||
get_test_home_assistant, assert_setup_component, load_fixture)
|
||||
get_test_home_assistant, assert_setup_component, load_fixture,
|
||||
mock_component)
|
||||
|
||||
from ...test_util.aiohttp import mock_aiohttp_client
|
||||
|
||||
@@ -39,7 +40,7 @@ class TestDdwrt(unittest.TestCase):
|
||||
def setup_method(self, _):
|
||||
"""Setup things to be run when tests are started."""
|
||||
self.hass = get_test_home_assistant()
|
||||
self.hass.config.components = set(['zone'])
|
||||
mock_component(self.hass, 'zone')
|
||||
|
||||
def teardown_method(self, _):
|
||||
"""Stop everything that was started."""
|
||||
|
||||
@@ -43,7 +43,6 @@ class TestComponentsDeviceTrackerMQTT(unittest.TestCase):
|
||||
|
||||
dev_id = 'paulus'
|
||||
topic = '/location/paulus'
|
||||
self.hass.config.components = set(['mqtt', 'zone'])
|
||||
assert setup_component(self.hass, device_tracker.DOMAIN, {
|
||||
device_tracker.DOMAIN: {
|
||||
CONF_PLATFORM: 'mqtt',
|
||||
|
||||
@@ -13,7 +13,8 @@ import homeassistant.components.device_tracker.upc_connect as platform
|
||||
from homeassistant.util.async import run_coroutine_threadsafe
|
||||
|
||||
from tests.common import (
|
||||
get_test_home_assistant, assert_setup_component, load_fixture)
|
||||
get_test_home_assistant, assert_setup_component, load_fixture,
|
||||
mock_component)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -30,7 +31,7 @@ class TestUPCConnect(object):
|
||||
def setup_method(self):
|
||||
"""Setup things to be run when tests are started."""
|
||||
self.hass = get_test_home_assistant()
|
||||
self.hass.config.components = set(['zone'])
|
||||
mock_component(self.hass, 'zone')
|
||||
|
||||
self.host = "127.0.0.1"
|
||||
|
||||
|
||||
Reference in new issue
Block a user