mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Improve type hints in openai_conversation tests (#123811)
This commit is contained in:
parent
04b1d2414d
commit
135f15fdc3
@ -13,7 +13,7 @@ from tests.common import MockConfigEntry
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_config_entry(hass):
|
||||
def mock_config_entry(hass: HomeAssistant) -> MockConfigEntry:
|
||||
"""Mock a config entry."""
|
||||
entry = MockConfigEntry(
|
||||
title="OpenAI",
|
||||
@ -27,7 +27,9 @@ def mock_config_entry(hass):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_config_entry_with_assist(hass, mock_config_entry):
|
||||
def mock_config_entry_with_assist(
|
||||
hass: HomeAssistant, mock_config_entry: MockConfigEntry
|
||||
) -> MockConfigEntry:
|
||||
"""Mock a config entry with assist."""
|
||||
hass.config_entries.async_update_entry(
|
||||
mock_config_entry, options={CONF_LLM_HASS_API: llm.LLM_API_ASSIST}
|
||||
@ -36,7 +38,9 @@ def mock_config_entry_with_assist(hass, mock_config_entry):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def mock_init_component(hass, mock_config_entry):
|
||||
async def mock_init_component(
|
||||
hass: HomeAssistant, mock_config_entry: MockConfigEntry
|
||||
) -> None:
|
||||
"""Initialize integration."""
|
||||
with patch(
|
||||
"openai.resources.models.AsyncModels.list",
|
||||
|
Loading…
x
Reference in New Issue
Block a user