Include deprecated constants in wildcard imports (#107114)

This commit is contained in:
Erik Montnemery 2024-01-05 11:46:45 +01:00 committed by GitHub
parent c063bf403a
commit c805ea7b4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 438 additions and 137 deletions

View file

@ -9,7 +9,11 @@ from homeassistant.setup import async_setup_component
from . import common
from tests.common import MockUser, import_and_test_deprecated_constant_enum
from tests.common import (
MockUser,
help_test_all,
import_and_test_deprecated_constant_enum,
)
@pytest.fixture(autouse=True)
@ -82,6 +86,11 @@ async def test_switch_context(
assert state2.context.user_id == hass_admin_user.id
def test_all() -> None:
"""Test module.__all__ is correctly set."""
help_test_all(switch)
@pytest.mark.parametrize(("enum"), list(switch.SwitchDeviceClass))
def test_deprecated_constants(
caplog: pytest.LogCaptureFixture,