Include deprecated constants in wildcard imports (#107114)
This commit is contained in:
parent
c063bf403a
commit
c805ea7b4f
52 changed files with 438 additions and 137 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue