mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Import Generator from typing_extensions (2) (#118989)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
"""Common fixtures for the Homeassistant Analytics tests."""
|
||||
|
||||
from collections.abc import Generator
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
import pytest
|
||||
from python_homeassistant_analytics import CurrentAnalytics
|
||||
from python_homeassistant_analytics.models import CustomIntegration, Integration
|
||||
from typing_extensions import Generator
|
||||
|
||||
from homeassistant.components.analytics_insights.const import (
|
||||
CONF_TRACKED_CUSTOM_INTEGRATIONS,
|
||||
@@ -17,7 +17,7 @@ from tests.common import MockConfigEntry, load_fixture, load_json_object_fixture
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
||||
def mock_setup_entry() -> Generator[AsyncMock]:
|
||||
"""Override async_setup_entry."""
|
||||
with patch(
|
||||
"homeassistant.components.analytics_insights.async_setup_entry",
|
||||
@@ -27,7 +27,7 @@ def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_analytics_client() -> Generator[AsyncMock, None, None]:
|
||||
def mock_analytics_client() -> Generator[AsyncMock]:
|
||||
"""Mock a Homeassistant Analytics client."""
|
||||
with (
|
||||
patch(
|
||||
|
||||
Reference in New Issue
Block a user