Skip to content

Commit

Permalink
freshen test
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Apr 17, 2020
1 parent 2d0ba33 commit 7a3b986
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/components/homekit/test_accessories.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ async def test_linked_battery_charging_sensor(hass, hk_driver, caplog):
acc.update_state = lambda x: None
assert acc.linked_battery_charging_sensor == linked_battery_charging_sensor

await hass.async_add_job(acc.run)
await acc.run_handler()
await hass.async_block_till_done()
assert acc._char_battery.value == 100
assert acc._char_low_battery.value == 0
Expand Down
4 changes: 2 additions & 2 deletions tests/components/homekit/test_homekit.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ async def test_homekit_start_with_a_broken_accessory(hass, hk_driver, debounce_p
) as hk_driver_add_acc, patch(
"pyhap.accessory_driver.AccessoryDriver.start"
) as hk_driver_start:
await hass.async_add_executor_job(homekit.start)
await homekit.async_start()

mock_setup_msg.assert_called_with(hass, pin)
hk_driver_add_acc.assert_called_with(homekit.bridge)
Expand All @@ -344,7 +344,7 @@ async def test_homekit_start_with_a_broken_accessory(hass, hk_driver, debounce_p

# Test start() if already started
hk_driver_start.reset_mock()
await hass.async_add_executor_job(homekit.start)
await homekit.async_start()
assert not hk_driver_start.called


Expand Down

0 comments on commit 7a3b986

Please sign in to comment.