homekit_controller test cleanups (#32212)

This commit is contained in:
Jc2k authored and GitHub committed 2020-02-26 09:44:04 -08:00
1 parent e435f6eb67
commit 92a47f14bb
6 files changed
+11 -19

No files matched your search

@@ -149,14 +149,8 @@ async def test_ecobee3_setup_connection_failure(hass):
# a successful setup.
# We just advance time by 5 minutes so that the retry happens, rather
# than manually invoking async_setup_entry - this means we need to
# make sure the IpPairing mock is in place or we'll try to connect to
# a real device. Normally this mocking is done by the helper in
# setup_test_accessories.
pairing_cls_loc = "homeassistant.components.homekit_controller.connection.IpPairing"
with mock.patch(pairing_cls_loc) as pairing_cls:
pairing_cls.return_value = pairing
await time_changed(hass, 5 * 60)
# than manually invoking async_setup_entry.
await time_changed(hass, 5 * 60)
climate = entity_registry.async_get("climate.homew")
assert climate.unique_id == "homekit-123456789012-16"