Deprecate deprecated device tracker constants (#106099)
This commit is contained in:
parent
28e4358c53
commit
9dd1b9e268
4 changed files with 60 additions and 13 deletions
|
@ -3,6 +3,7 @@ from datetime import datetime, timedelta
|
|||
import json
|
||||
import logging
|
||||
import os
|
||||
from types import ModuleType
|
||||
from unittest.mock import Mock, call, patch
|
||||
|
||||
import pytest
|
||||
|
@ -33,6 +34,7 @@ from . import common
|
|||
from tests.common import (
|
||||
assert_setup_component,
|
||||
async_fire_time_changed,
|
||||
import_and_test_deprecated_constant_enum,
|
||||
mock_registry,
|
||||
mock_restore_cache,
|
||||
patch_yaml_files,
|
||||
|
@ -681,3 +683,19 @@ def test_see_schema_allowing_ios_calls() -> None:
|
|||
"hostname": "beer",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("enum"), list(SourceType))
|
||||
@pytest.mark.parametrize(
|
||||
"module",
|
||||
[device_tracker, device_tracker.const],
|
||||
)
|
||||
def test_deprecated_constants(
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
enum: SourceType,
|
||||
module: ModuleType,
|
||||
) -> None:
|
||||
"""Test deprecated constants."""
|
||||
import_and_test_deprecated_constant_enum(
|
||||
caplog, module, enum, "SOURCE_TYPE_", "2025.1"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue