Prepare for new aiohomekit lifecycle API (#66340)

This commit is contained in:
Jc2k 2022-02-11 19:26:35 +00:00 committed by GitHub
parent 2f220b27d4
commit 0daf20c0cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 79 additions and 28 deletions

View file

@ -27,7 +27,10 @@ def utcnow(request):
def controller(hass):
"""Replace aiohomekit.Controller with an instance of aiohomekit.testing.FakeController."""
instance = FakeController()
with unittest.mock.patch("aiohomekit.Controller", return_value=instance):
with unittest.mock.patch(
"homeassistant.components.homekit_controller.utils.Controller",
return_value=instance,
):
yield instance