Import Generator from typing_extensions (3) (#118990)

This commit is contained in:
Marc Mueller 2024-06-06 17:28:59 +02:00 committed by GitHub
parent 0ecab967dd
commit 33ed4fd862
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
93 changed files with 258 additions and 257 deletions

View file

@ -2,11 +2,11 @@
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from requests_mock import Mocker
from typing_extensions import Generator
from homeassistant.components.mjpeg.const import (
CONF_MJPEG_URL,
@ -44,7 +44,7 @@ def mock_config_entry() -> MockConfigEntry:
@pytest.fixture
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
def mock_setup_entry() -> Generator[AsyncMock]:
"""Mock setting up a config entry."""
with patch(
"homeassistant.components.mjpeg.async_setup_entry", return_value=True
@ -53,7 +53,7 @@ def mock_setup_entry() -> Generator[AsyncMock, None, None]:
@pytest.fixture
def mock_reload_entry() -> Generator[AsyncMock, None, None]:
def mock_reload_entry() -> Generator[AsyncMock]:
"""Mock setting up a config entry."""
with patch("homeassistant.components.mjpeg.async_reload_entry") as mock_reload:
yield mock_reload