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
|
@ -24,18 +24,18 @@ from homeassistant.exceptions import HomeAssistantError
|
|||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||
import homeassistant.util.dt as dt_util
|
||||
|
||||
from tests.common import MockConfigEntry, async_fire_time_changed
|
||||
from tests.common import async_fire_time_changed
|
||||
|
||||
pytestmark = pytest.mark.usefixtures("init_integration")
|
||||
|
||||
|
||||
async def test_bluetooth(
|
||||
hass: HomeAssistant,
|
||||
init_integration: MockConfigEntry,
|
||||
mock_lametric: MagicMock,
|
||||
device_registry: dr.DeviceRegistry,
|
||||
entity_registry: er.EntityRegistry,
|
||||
) -> None:
|
||||
"""Test the LaMetric Bluetooth control."""
|
||||
device_registry = dr.async_get(hass)
|
||||
entity_registry = er.async_get(hass)
|
||||
|
||||
state = hass.states.get("switch.frenck_s_lametric_bluetooth")
|
||||
assert state
|
||||
assert state.attributes.get(ATTR_DEVICE_CLASS) is None
|
||||
|
@ -95,7 +95,6 @@ async def test_bluetooth(
|
|||
|
||||
async def test_switch_error(
|
||||
hass: HomeAssistant,
|
||||
init_integration: MockConfigEntry,
|
||||
mock_lametric: MagicMock,
|
||||
) -> None:
|
||||
"""Test error handling of the LaMetric switches."""
|
||||
|
@ -125,7 +124,6 @@ async def test_switch_error(
|
|||
|
||||
async def test_switch_connection_error(
|
||||
hass: HomeAssistant,
|
||||
init_integration: MockConfigEntry,
|
||||
mock_lametric: MagicMock,
|
||||
) -> None:
|
||||
"""Test connection error handling of the LaMetric switches."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue