mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
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:
@@ -1190,7 +1190,7 @@ def disable_translations_once(translations_once):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_zeroconf() -> Generator[None, None, None]:
|
||||
def mock_zeroconf() -> Generator[MagicMock, None, None]:
|
||||
"""Mock zeroconf."""
|
||||
from zeroconf import DNSCache # pylint: disable=import-outside-toplevel
|
||||
|
||||
@@ -1206,7 +1206,7 @@ def mock_zeroconf() -> Generator[None, None, None]:
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_async_zeroconf(mock_zeroconf: None) -> Generator[None, None, None]:
|
||||
def mock_async_zeroconf(mock_zeroconf: MagicMock) -> Generator[MagicMock, None, None]:
|
||||
"""Mock AsyncZeroconf."""
|
||||
from zeroconf import DNSCache, Zeroconf # pylint: disable=import-outside-toplevel
|
||||
from zeroconf.asyncio import ( # pylint: disable=import-outside-toplevel
|
||||
|
||||
Reference in New Issue
Block a user