1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +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,6 @@ import pytest
from homeassistant.core import DOMAIN as HASS_DOMAIN
from homeassistant.setup import async_setup_component
from homeassistant.components import conversation
import homeassistant.components as component
from homeassistant.components.cover import (SERVICE_OPEN_COVER)
from homeassistant.helpers import intent
@@ -16,7 +15,7 @@ async def test_calling_intent(hass):
"""Test calling an intent from a conversation."""
intents = async_mock_intent(hass, 'OrderBeer')
result = await component.async_setup(hass, {})
result = await async_setup_component(hass, 'homeassistant', {})
assert result
result = await async_setup_component(hass, 'conversation', {
@@ -146,7 +145,7 @@ async def test_http_processing_intent(hass, hass_client):
@pytest.mark.parametrize('sentence', ('turn on kitchen', 'turn kitchen on'))
async def test_turn_on_intent(hass, sentence):
"""Test calling the turn on intent."""
result = await component.async_setup(hass, {})
result = await async_setup_component(hass, 'homeassistant', {})
assert result
result = await async_setup_component(hass, 'conversation', {})
@@ -197,7 +196,7 @@ async def test_cover_intents_loading(hass):
@pytest.mark.parametrize('sentence', ('turn off kitchen', 'turn kitchen off'))
async def test_turn_off_intent(hass, sentence):
"""Test calling the turn on intent."""
result = await component.async_setup(hass, {})
result = await async_setup_component(hass, 'homeassistant', {})
assert result
result = await async_setup_component(hass, 'conversation', {})
@@ -222,7 +221,7 @@ async def test_turn_off_intent(hass, sentence):
@pytest.mark.parametrize('sentence', ('toggle kitchen', 'kitchen toggle'))
async def test_toggle_intent(hass, sentence):
"""Test calling the turn on intent."""
result = await component.async_setup(hass, {})
result = await async_setup_component(hass, 'homeassistant', {})
assert result
result = await async_setup_component(hass, 'conversation', {})
@@ -246,7 +245,7 @@ async def test_toggle_intent(hass, sentence):
async def test_http_api(hass, hass_client):
"""Test the HTTP conversation API."""
result = await component.async_setup(hass, {})
result = await async_setup_component(hass, 'homeassistant', {})
assert result
result = await async_setup_component(hass, 'conversation', {})
@@ -270,7 +269,7 @@ async def test_http_api(hass, hass_client):
async def test_http_api_wrong_data(hass, hass_client):
"""Test the HTTP conversation API."""
result = await component.async_setup(hass, {})
result = await async_setup_component(hass, 'homeassistant', {})
assert result
result = await async_setup_component(hass, 'conversation', {})