Break apart zeroconf integration to prepare for WebSocket API (#143490)

This commit is contained in:
J. Nick Koston
2025-04-23 07:47:37 -10:00
committed by GitHub
parent 65db3c1164
commit 36081c69e0
5 changed files with 470 additions and 436 deletions

View File

@@ -1346,7 +1346,10 @@ def mock_zeroconf() -> Generator[MagicMock]:
with (
patch("homeassistant.components.zeroconf.HaZeroconf", autospec=True) as mock_zc,
patch("homeassistant.components.zeroconf.AsyncServiceBrowser", autospec=True),
patch(
"homeassistant.components.zeroconf.discovery.AsyncServiceBrowser",
autospec=True,
),
):
zc = mock_zc.return_value
# DNSCache has strong Cython type checks, and MagicMock does not work