mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 18:39:30 +00:00
Add property supported_languages to AbstractConversationAgent (#91588)
* Add property supported_languages to AbstractConversationAgent * Fix test * Use MATCH_ALL for openai supported languages
This commit is contained in:
@@ -7,6 +7,7 @@ from unittest.mock import call, patch
|
||||
import aiohttp
|
||||
import pytest
|
||||
|
||||
from homeassistant.components import conversation
|
||||
from homeassistant.components.google_assistant_sdk import DOMAIN
|
||||
from homeassistant.config_entries import ConfigEntryState
|
||||
from homeassistant.core import HomeAssistant
|
||||
@@ -334,6 +335,9 @@ async def test_conversation_agent(
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
agent = await conversation._get_agent_manager(hass).async_get_agent(entry.entry_id)
|
||||
assert agent.supported_languages == ["en-US"]
|
||||
|
||||
text1 = "tell me a joke"
|
||||
text2 = "tell me another one"
|
||||
with patch(
|
||||
|
||||
Reference in New Issue
Block a user