Remove EVENT_TIME_CHANGED and EVENT_TIMER_OUT_OF_SYNC (#69643)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
689b347904
commit
fe6a4bfb1d
44 changed files with 397 additions and 839 deletions
|
@ -5,6 +5,7 @@ from datetime import timedelta
|
|||
import logging
|
||||
from unittest.mock import AsyncMock, Mock, patch
|
||||
|
||||
from freezegun import freeze_time
|
||||
import pytest
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -177,7 +178,7 @@ async def test_extract_from_service_available_device(hass):
|
|||
)
|
||||
|
||||
|
||||
async def test_platform_not_ready(hass, legacy_patchable_time):
|
||||
async def test_platform_not_ready(hass):
|
||||
"""Test that we retry when platform not ready."""
|
||||
platform1_setup = Mock(side_effect=[PlatformNotReady, PlatformNotReady, None])
|
||||
mock_integration(hass, MockModule("mod1"))
|
||||
|
@ -192,7 +193,7 @@ async def test_platform_not_ready(hass, legacy_patchable_time):
|
|||
|
||||
utcnow = dt_util.utcnow()
|
||||
|
||||
with patch("homeassistant.util.dt.utcnow", return_value=utcnow):
|
||||
with freeze_time(utcnow):
|
||||
# Should not trigger attempt 2
|
||||
async_fire_time_changed(hass, utcnow + timedelta(seconds=29))
|
||||
await hass.async_block_till_done()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue