1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Remove some more usage of run_in_executor (#8352)

* Remove usage of run_in_executor

* Lint
This commit is contained in:
Paulus Schoutsen
2017-07-06 05:08:32 -07:00
committed by Pascal Vizeli
parent d655c0e358
commit 143044f8f1
3 changed files with 29 additions and 54 deletions

View File

@@ -83,15 +83,13 @@ def test_trigger_sensor_value_changed(hass, mock_openzwave):
assert not device.is_on
value.data = True
yield from hass.loop.run_in_executor(None, value_changed, value)
yield from hass.async_block_till_done()
yield from hass.async_add_job(value_changed, value)
assert device.invalidate_after is None
device.hass = hass
value.data = True
yield from hass.loop.run_in_executor(None, value_changed, value)
yield from hass.async_block_till_done()
yield from hass.async_add_job(value_changed, value)
assert device.is_on
test_time = device.invalidate_after - datetime.timedelta(seconds=1)