Refactor zeroconf setup to be async (#39955)
* Refactor zeroconf setup to be async Most of the setup was calling back to async because we were setting up listeners. Since we only need to jump into the executor to create the zeroconf instance, its much faster to setup in async. In testing this cut the setup time in half or better. * partial revert to after_deps
This commit is contained in:
parent
00acb180d6
commit
7b016063ca
10 changed files with 84 additions and 91 deletions
|
@ -1,11 +0,0 @@
|
|||
"""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
|
Loading…
Add table
Add a link
Reference in a new issue