1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 14:08:21 +00:00

Migrate collection of component tests from coroutine to async/await (#30504)

This commit is contained in:
Franck Nijhof
2020-01-06 01:22:22 +01:00
committed by Martin Hjelmare
parent f400b77837
commit e642d95d0f
7 changed files with 45 additions and 69 deletions

View File

@@ -1,18 +1,15 @@
"""Test intent_script component."""
import asyncio
from homeassistant.bootstrap import async_setup_component
from homeassistant.helpers import intent
from tests.common import async_mock_service
@asyncio.coroutine
def test_intent_script(hass):
async def test_intent_script(hass):
"""Test intent scripts work."""
calls = async_mock_service(hass, "test", "service")
yield from async_setup_component(
await async_setup_component(
hass,
"intent_script",
{
@@ -32,7 +29,7 @@ def test_intent_script(hass):
},
)
response = yield from intent.async_handle(
response = await intent.async_handle(
hass, "test", "HelloWorld", {"name": {"value": "Paulus"}}
)