Skip to content

Commit 12fc79e

Browse files
authored
Fix google_generative_ai_conversation tests opening sockets (home-assistant#156371)
1 parent ca2e7b9 commit 12fc79e

File tree

1 file changed

+3
-2
lines changed
  • tests/components/google_generative_ai_conversation

1 file changed

+3
-2
lines changed

tests/components/google_generative_ai_conversation/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Tests helpers."""
22

3-
from collections.abc import Generator
3+
from collections.abc import AsyncGenerator, Generator
44
from unittest.mock import AsyncMock, Mock, patch
55

66
import pytest
@@ -108,13 +108,14 @@ async def mock_config_entry_with_google_search(
108108
@pytest.fixture
109109
async def mock_init_component(
110110
hass: HomeAssistant, mock_config_entry: ConfigEntry
111-
) -> None:
111+
) -> AsyncGenerator[None]:
112112
"""Initialize integration."""
113113
with patch("google.genai.models.AsyncModels.get"):
114114
assert await async_setup_component(
115115
hass, "google_generative_ai_conversation", {}
116116
)
117117
await hass.async_block_till_done()
118+
yield
118119

119120

120121
@pytest.fixture(autouse=True)

0 commit comments

Comments
 (0)