Cleanup use of test fixtures in LaMetric tests (#88453)
Cleanup use of test fixture in LaMetric tests
This commit is contained in:
parent
172d505314
commit
c4f92f5ad4
9 changed files with 115 additions and 160 deletions
|
@ -22,18 +22,16 @@ from homeassistant.core import HomeAssistant
|
|||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
pytestmark = pytest.mark.usefixtures("init_integration")
|
||||
|
||||
|
||||
async def test_brightness_mode(
|
||||
hass: HomeAssistant,
|
||||
init_integration: MockConfigEntry,
|
||||
mock_lametric: MagicMock,
|
||||
device_registry: dr.DeviceRegistry,
|
||||
entity_registry: er.EntityRegistry,
|
||||
) -> None:
|
||||
"""Test the LaMetric brightness mode controls."""
|
||||
device_registry = dr.async_get(hass)
|
||||
entity_registry = er.async_get(hass)
|
||||
|
||||
state = hass.states.get("select.frenck_s_lametric_brightness_mode")
|
||||
assert state
|
||||
assert (
|
||||
|
@ -76,7 +74,6 @@ async def test_brightness_mode(
|
|||
|
||||
async def test_select_error(
|
||||
hass: HomeAssistant,
|
||||
init_integration: MockConfigEntry,
|
||||
mock_lametric: MagicMock,
|
||||
) -> None:
|
||||
"""Test error handling of the LaMetric selects."""
|
||||
|
@ -107,7 +104,6 @@ async def test_select_error(
|
|||
|
||||
async def test_select_connection_error(
|
||||
hass: HomeAssistant,
|
||||
init_integration: MockConfigEntry,
|
||||
mock_lametric: MagicMock,
|
||||
) -> None:
|
||||
"""Test connection error handling of the LaMetric selects."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue