1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Move core stuff into Home Assistant integration (#22407)

* Move core stuff into Home Assistant integration

* Lint
This commit is contained in:
Paulus Schoutsen
2019-03-26 05:38:33 -07:00
committed by Pascal Vizeli
parent bad0a8b342
commit 65432ba552
15 changed files with 175 additions and 170 deletions

View File

@@ -5,7 +5,7 @@ import unittest
from unittest.mock import patch
import homeassistant.core as ha
import homeassistant.components as core_components
from homeassistant.setup import async_setup_component
from homeassistant.const import (SERVICE_TURN_ON, SERVICE_TURN_OFF)
from homeassistant.util.async_ import run_coroutine_threadsafe
from homeassistant.util import dt as dt_util
@@ -88,8 +88,8 @@ class TestStateHelpers(unittest.TestCase):
def setUp(self): # pylint: disable=invalid-name
"""Run when tests are started."""
self.hass = get_test_home_assistant()
run_coroutine_threadsafe(core_components.async_setup(
self.hass, {}), self.hass.loop).result()
run_coroutine_threadsafe(async_setup_component(
self.hass, 'homeassistant', {}), self.hass.loop).result()
def tearDown(self): # pylint: disable=invalid-name
"""Stop when tests are finished."""