Use the shared zeroconf instance when attempting to create another Zeroconf instance (#38744)
This commit is contained in:
1 parent
34cb12d3c9
commit
444df4a7d2
8 files changed
+187
-17
No files matched your search
@@ -1,5 +1,4 @@
|
||||
"""Test Zeroconf component setup process."""
|
||||
import pytest
|
||||
from zeroconf import InterfaceChoice, IPVersion, ServiceInfo, ServiceStateChange
|
||||
|
||||
from homeassistant.components import zeroconf
|
||||
@@ -22,13 +21,6 @@ HOMEKIT_STATUS_UNPAIRED = b"1"
|
||||
HOMEKIT_STATUS_PAIRED = b"0"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_zeroconf():
|
||||
"""Mock zeroconf."""
|
||||
with patch("homeassistant.components.zeroconf.HaZeroconf") as mock_zc:
|
||||
yield mock_zc.return_value
|
||||
|
||||
|
||||
def service_update_mock(zeroconf, services, handlers):
|
||||
"""Call service update handler."""
|
||||
for service in services:
|
||||
|
||||
Reference in new issue
Block a user