mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Improve type hints in ssdp tests (#123892)
This commit is contained in:
parent
a712eca70a
commit
165ec62405
@ -1,11 +1,14 @@
|
||||
"""Configuration for SSDP tests."""
|
||||
|
||||
from collections.abc import Generator
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
from async_upnp_client.server import UpnpServer
|
||||
from async_upnp_client.ssdp_listener import SsdpListener
|
||||
import pytest
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
async def silent_ssdp_listener():
|
||||
@ -32,7 +35,7 @@ async def disabled_upnp_server():
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_flow_init(hass):
|
||||
def mock_flow_init(hass: HomeAssistant) -> Generator[AsyncMock]:
|
||||
"""Mock hass.config_entries.flow.async_init."""
|
||||
with patch.object(
|
||||
hass.config_entries.flow, "async_init", return_value=AsyncMock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user