Remove homeassistant from conversation dependencies (#92170)

* Remove homeassistant from conversation dependencies

* Fix tests
This commit is contained in:
Erik Montnemery 2023-04-28 18:17:48 +02:00 committed by GitHub
parent e6438dabff
commit f8f7de5d5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 1 deletions

View file

@ -1162,6 +1162,7 @@ async def test_ws_api(
hass: HomeAssistant, hass_ws_client: WebSocketGenerator, payload
) -> None:
"""Test the Websocket conversation API."""
assert await async_setup_component(hass, "homeassistant", {})
assert await async_setup_component(hass, "conversation", {})
client = await hass_ws_client(hass)
@ -1192,6 +1193,7 @@ async def test_ws_prepare(
hass: HomeAssistant, hass_ws_client: WebSocketGenerator, agent_id
) -> None:
"""Test the Websocket prepare conversation API."""
assert await async_setup_component(hass, "homeassistant", {})
assert await async_setup_component(hass, "conversation", {})
agent = await conversation._get_agent_manager(hass).async_get_agent()
assert isinstance(agent, conversation.DefaultAgent)
@ -1320,6 +1322,7 @@ async def test_custom_sentences_config(
async def test_prepare_reload(hass: HomeAssistant) -> None:
"""Test calling the reload service."""
language = hass.config.language
assert await async_setup_component(hass, "homeassistant", {})
assert await async_setup_component(hass, "conversation", {})
# Load intents
@ -1340,6 +1343,7 @@ async def test_prepare_reload(hass: HomeAssistant) -> None:
async def test_prepare_fail(hass: HomeAssistant) -> None:
"""Test calling prepare with a non-existent language."""
assert await async_setup_component(hass, "homeassistant", {})
assert await async_setup_component(hass, "conversation", {})
# Load intents
@ -1387,6 +1391,7 @@ async def test_language_region(
async def test_reload_on_new_component(hass: HomeAssistant) -> None:
"""Test intents being reloaded when a new component is loaded."""
language = hass.config.language
assert await async_setup_component(hass, "homeassistant", {})
assert await async_setup_component(hass, "conversation", {})
# Load intents