mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
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:
committed by
Paulus Schoutsen
parent
383b0914b3
commit
41f558b181
@@ -45,7 +45,6 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
def test_setup_fails(self): \
|
||||
# pylint: disable=invalid-name
|
||||
"""Test that setup fails with missing required configuration items."""
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(0):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
@@ -58,7 +57,6 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
def test_state_change_via_topic(self): \
|
||||
# pylint: disable=invalid-name
|
||||
"""Test state change via topic."""
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(1):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
@@ -93,7 +91,6 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
def test_state_brightness_color_effect_change_via_topic(self): \
|
||||
# pylint: disable=invalid-name
|
||||
"""Test state, brightness, color and effect change via topic."""
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(1):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
@@ -170,7 +167,6 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
def test_optimistic(self): \
|
||||
# pylint: disable=invalid-name
|
||||
"""Test optimistic mode."""
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(1):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
@@ -232,7 +228,6 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
def test_flash(self): \
|
||||
# pylint: disable=invalid-name
|
||||
"""Test flash."""
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(1):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
@@ -276,7 +271,6 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
|
||||
def test_transition(self):
|
||||
"""Test for transition time being sent when included."""
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(1):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
@@ -320,7 +314,6 @@ class TestLightMQTTTemplate(unittest.TestCase):
|
||||
def test_invalid_values(self): \
|
||||
# pylint: disable=invalid-name
|
||||
"""Test that invalid values are ignored."""
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
with assert_setup_component(1):
|
||||
assert setup_component(self.hass, light.DOMAIN, {
|
||||
light.DOMAIN: {
|
||||
|
||||
Reference in New Issue
Block a user