Fix incorrect zeroconf type hint in tests (#118465)

* Fix incorrect `mock_async_zeroconf` type hint

* Adjust thread

* One more

* Fix mock_zeroconf also

* Adjust

* Adjust
This commit is contained in:
epenet
2024-05-30 21:57:09 +02:00
committed by GitHub
parent 1352c4e427
commit a5dc4cb1c7
9 changed files with 40 additions and 32 deletions

View File

@@ -1,6 +1,6 @@
"""Test the thread websocket API."""
from unittest.mock import ANY, AsyncMock
from unittest.mock import ANY, AsyncMock, MagicMock
from zeroconf.asyncio import AsyncServiceInfo
@@ -315,7 +315,9 @@ async def test_set_preferred_dataset_wrong_id(
async def test_discover_routers(
hass: HomeAssistant, hass_ws_client: WebSocketGenerator, mock_async_zeroconf: None
hass: HomeAssistant,
hass_ws_client: WebSocketGenerator,
mock_async_zeroconf: MagicMock,
) -> None:
"""Test discovering thread routers."""
mock_async_zeroconf.async_add_service_listener = AsyncMock()