Use eventloop for scheduling (#37184)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
0f72008090
commit
89a9634d35
42 changed files with 366 additions and 272 deletions
|
@ -12,7 +12,7 @@ import homeassistant.util.dt as dt_util
|
|||
from tests.async_mock import patch
|
||||
|
||||
|
||||
async def test_setting_rising(hass):
|
||||
async def test_setting_rising(hass, legacy_patchable_time):
|
||||
"""Test retrieving sun setting and rising."""
|
||||
utc_now = datetime(2016, 11, 1, 8, 0, 0, tzinfo=dt_util.UTC)
|
||||
with patch("homeassistant.helpers.condition.dt_util.utcnow", return_value=utc_now):
|
||||
|
@ -103,7 +103,7 @@ async def test_setting_rising(hass):
|
|||
)
|
||||
|
||||
|
||||
async def test_state_change(hass):
|
||||
async def test_state_change(hass, legacy_patchable_time):
|
||||
"""Test if the state changes at next setting/rising."""
|
||||
now = datetime(2016, 6, 1, 8, 0, 0, tzinfo=dt_util.UTC)
|
||||
with patch("homeassistant.helpers.condition.dt_util.utcnow", return_value=now):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue