Use eventloop for scheduling (#37184)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
1 parent
0f72008090
commit
89a9634d35
42 files changed
+366
-272
No files matched your search
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user