mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 18:39:30 +00:00
Remove deprecated automation constants (#131792)
This commit is contained in:
@@ -50,7 +50,6 @@ from homeassistant.helpers.script import (
|
||||
SCRIPT_MODE_SINGLE,
|
||||
_async_stop_scripts_at_shutdown,
|
||||
)
|
||||
from homeassistant.helpers.trigger import TriggerActionType, TriggerData, TriggerInfo
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.util import yaml
|
||||
import homeassistant.util.dt as dt_util
|
||||
@@ -62,8 +61,6 @@ from tests.common import (
|
||||
async_capture_events,
|
||||
async_fire_time_changed,
|
||||
async_mock_service,
|
||||
help_test_all,
|
||||
import_and_test_deprecated_constant,
|
||||
mock_restore_cache,
|
||||
)
|
||||
from tests.components.logbook.common import MockRow, mock_humanify
|
||||
@@ -3153,30 +3150,6 @@ async def test_websocket_config(
|
||||
assert msg["error"]["code"] == "not_found"
|
||||
|
||||
|
||||
def test_all() -> None:
|
||||
"""Test module.__all__ is correctly set."""
|
||||
help_test_all(automation)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("constant_name", "replacement"),
|
||||
[
|
||||
("AutomationActionType", TriggerActionType),
|
||||
("AutomationTriggerData", TriggerData),
|
||||
("AutomationTriggerInfo", TriggerInfo),
|
||||
],
|
||||
)
|
||||
def test_deprecated_constants(
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
constant_name: str,
|
||||
replacement: Any,
|
||||
) -> None:
|
||||
"""Test deprecated automation constants."""
|
||||
import_and_test_deprecated_constant(
|
||||
caplog, automation, constant_name, replacement.__name__, replacement, "2025.1"
|
||||
)
|
||||
|
||||
|
||||
async def test_automation_turns_off_other_automation(hass: HomeAssistant) -> None:
|
||||
"""Test an automation that turns off another automation."""
|
||||
hass.set_state(CoreState.not_running)
|
||||
|
||||
Reference in New Issue
Block a user