* Phase out periodic tasks * false by default or some tests will block forever, will need to fix each one manually * kwarg works * kwarg works * kwarg works * fixes * fix more tests * fix more tests * fix lifx * opensky * pvpc_hourly_pricing * adjust more * adjust more * smarttub * adjust more * adjust more * adjust more * adjust more * adjust * no eager executor * zha * qnap_qsw * fix more * fix fix * docs * its a wrapper now * add more coverage * coverage * cover all combos * more fixes * more fixes * more fixes * remaining issues are legit bugs in tests * make tplink test more predictable * more fixes * feedreader * grind out some more * make test race safe * one more
16 lines
577 B
Python
16 lines
577 B
Python
"""Tests for the smarttub integration."""
|
|
|
|
from datetime import timedelta
|
|
|
|
from homeassistant.components.smarttub.const import SCAN_INTERVAL
|
|
from homeassistant.core import HomeAssistant
|
|
from homeassistant.util import dt as dt_util
|
|
|
|
from tests.common import async_fire_time_changed
|
|
|
|
|
|
async def trigger_update(hass: HomeAssistant) -> None:
|
|
"""Trigger a polling update by moving time forward."""
|
|
new_time = dt_util.utcnow() + timedelta(seconds=SCAN_INTERVAL + 1)
|
|
async_fire_time_changed(hass, new_time)
|
|
await hass.async_block_till_done(wait_background_tasks=True)
|