Remove EVENT_TIME_CHANGED and EVENT_TIMER_OUT_OF_SYNC (#69643)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
J. Nick Koston 2022-04-09 09:05:54 -10:00 committed by GitHub
parent 689b347904
commit fe6a4bfb1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 397 additions and 839 deletions

View file

@ -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()