Protect loop set default executor (#37438)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
f8651d9faa
commit
f49ce5d1b4
21 changed files with 387 additions and 244 deletions
|
@ -8,8 +8,8 @@ from homeassistant.core import callback as ha_callback
|
|||
from tests.async_mock import patch
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def hk_driver():
|
||||
@pytest.fixture
|
||||
def hk_driver(loop):
|
||||
"""Return a custom AccessoryDriver instance for HomeKit accessory init."""
|
||||
with patch("pyhap.accessory_driver.Zeroconf"), patch(
|
||||
"pyhap.accessory_driver.AccessoryEncoder"
|
||||
|
@ -18,7 +18,7 @@ def hk_driver():
|
|||
), patch(
|
||||
"pyhap.accessory_driver.AccessoryDriver.persist"
|
||||
):
|
||||
yield AccessoryDriver(pincode=b"123-45-678", address="127.0.0.1")
|
||||
yield AccessoryDriver(pincode=b"123-45-678", address="127.0.0.1", loop=loop)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue