mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Fix zeroconf mock and use it in CI group 1's tests (#55526)
* Fix zeroconf mock and use it in CI group 1's tests * Mock HaAsyncServiceBrowser
This commit is contained in:
@@ -480,8 +480,10 @@ async def mqtt_mock(hass, mqtt_client_mock, mqtt_config):
|
||||
@pytest.fixture
|
||||
def mock_zeroconf():
|
||||
"""Mock zeroconf."""
|
||||
with patch("homeassistant.components.zeroconf.models.HaZeroconf") as mock_zc:
|
||||
yield mock_zc.return_value
|
||||
with patch("homeassistant.components.zeroconf.HaZeroconf", autospec=True), patch(
|
||||
"homeassistant.components.zeroconf.HaAsyncServiceBrowser", autospec=True
|
||||
):
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
Reference in New Issue
Block a user