Fix lingering timer in condition tests (#89807)
parent
6e25abfdcc
commit
1a7e316b51
|
@ -6,7 +6,6 @@ from unittest.mock import AsyncMock, patch
|
||||||
import pytest
|
import pytest
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components import sun
|
|
||||||
import homeassistant.components.automation as automation
|
import homeassistant.components.automation as automation
|
||||||
from homeassistant.components.sensor import SensorDeviceClass
|
from homeassistant.components.sensor import SensorDeviceClass
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
@ -39,15 +38,6 @@ def calls(hass: HomeAssistant) -> list[ServiceCall]:
|
||||||
return async_mock_service(hass, "test", "automation")
|
return async_mock_service(hass, "test", "automation")
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
|
||||||
def setup_comp(hass: HomeAssistant) -> None:
|
|
||||||
"""Initialize components."""
|
|
||||||
hass.config.set_time_zone(hass.config.time_zone)
|
|
||||||
hass.loop.run_until_complete(
|
|
||||||
async_setup_component(hass, sun.DOMAIN, {sun.DOMAIN: {}})
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def assert_element(trace_element, expected_element, path):
|
def assert_element(trace_element, expected_element, path):
|
||||||
"""Assert a trace element is as expected.
|
"""Assert a trace element is as expected.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue