Use the shared zeroconf instance when attempting to create another Zeroconf instance (#38744)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-08-12 16:08:33 +02:00
1 parent 34cb12d3c9
commit 444df4a7d2
8 files changed
+187 -17

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
"""conftest for zeroconf."""
import pytest
from tests.async_mock import patch
@pytest.fixture
def mock_zeroconf():
"""Mock zeroconf."""
with patch("homeassistant.components.zeroconf.HaZeroconf") as mock_zc:
yield mock_zc.return_value