mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Async bootstrap / component init (#3991)
* Async bootstrap * Adress comments * Fix tests * More fixes * Tests fixes
This commit is contained in:
committed by
Paulus Schoutsen
parent
d9999f36e8
commit
d5368f6f78
@@ -1,7 +1,7 @@
|
||||
"""The tests for the Event automation."""
|
||||
import unittest
|
||||
|
||||
from homeassistant.bootstrap import _setup_component
|
||||
from homeassistant.bootstrap import setup_component
|
||||
import homeassistant.components.automation as automation
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
@@ -28,7 +28,7 @@ class TestAutomationEvent(unittest.TestCase):
|
||||
|
||||
def test_if_fires_on_event(self):
|
||||
"""Test the firing of events."""
|
||||
assert _setup_component(self.hass, automation.DOMAIN, {
|
||||
assert setup_component(self.hass, automation.DOMAIN, {
|
||||
automation.DOMAIN: {
|
||||
'trigger': {
|
||||
'platform': 'event',
|
||||
@@ -53,7 +53,7 @@ class TestAutomationEvent(unittest.TestCase):
|
||||
|
||||
def test_if_fires_on_event_with_data(self):
|
||||
"""Test the firing of events with data."""
|
||||
assert _setup_component(self.hass, automation.DOMAIN, {
|
||||
assert setup_component(self.hass, automation.DOMAIN, {
|
||||
automation.DOMAIN: {
|
||||
'trigger': {
|
||||
'platform': 'event',
|
||||
@@ -73,7 +73,7 @@ class TestAutomationEvent(unittest.TestCase):
|
||||
|
||||
def test_if_not_fires_if_event_data_not_matches(self):
|
||||
"""Test firing of event if no match."""
|
||||
assert _setup_component(self.hass, automation.DOMAIN, {
|
||||
assert setup_component(self.hass, automation.DOMAIN, {
|
||||
automation.DOMAIN: {
|
||||
'trigger': {
|
||||
'platform': 'event',
|
||||
|
||||
Reference in New Issue
Block a user