Use eventloop for scheduling (#37184)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
J. Nick KostonandPaulus Schoutsen authored and GitHub committed 2020-06-29 09:39:24 -07:00
1 parent 0f72008090
commit 89a9634d35
42 files changed
+366 -272

No files matched your search

+3 -2
View File
@@ -2,11 +2,12 @@
from datetime import timedelta
import io
from homeassistant import core as ha
from homeassistant.config import async_process_ha_core_config
from homeassistant.setup import async_setup_component
from homeassistant.util import dt as dt_util
from tests.common import async_fire_time_changed
async def test_bad_posting(hass, aiohttp_client):
"""Test that posting to wrong api endpoint fails."""
@@ -74,7 +75,7 @@ async def test_posting_url(hass, aiohttp_client):
# await timeout
shifted_time = dt_util.utcnow() + timedelta(seconds=15)
hass.bus.async_fire(ha.EVENT_TIME_CHANGED, {ha.ATTR_NOW: shifted_time})
async_fire_time_changed(hass, shifted_time)
await hass.async_block_till_done()
# back to initial state