Sort Home Connect test params (#144035)

This commit is contained in:
J. Diego Rodríguez Royo
2025-05-01 12:04:25 +02:00
committed by GitHub
parent 92944fa509
commit 79aa7aacec
14 changed files with 333 additions and 350 deletions

View File

@@ -34,13 +34,13 @@ def platforms() -> list[str]:
@pytest.mark.parametrize("appliance", ["Washer"], indirect=True)
async def test_paired_depaired_devices_flow(
appliance: HomeAppliance,
hass: HomeAssistant,
config_entry: MockConfigEntry,
integration_setup: Callable[[MagicMock], Awaitable[bool]],
client: MagicMock,
device_registry: dr.DeviceRegistry,
entity_registry: er.EntityRegistry,
client: MagicMock,
config_entry: MockConfigEntry,
integration_setup: Callable[[MagicMock], Awaitable[bool]],
appliance: HomeAppliance,
) -> None:
"""Test that removed devices are correctly removed from and added to hass on API events."""
assert config_entry.state == ConfigEntryState.NOT_LOADED
@@ -96,14 +96,14 @@ async def test_paired_depaired_devices_flow(
indirect=["appliance"],
)
async def test_connected_devices(
appliance: HomeAppliance,
keys_to_check: tuple,
hass: HomeAssistant,
config_entry: MockConfigEntry,
integration_setup: Callable[[MagicMock], Awaitable[bool]],
client: MagicMock,
device_registry: dr.DeviceRegistry,
entity_registry: er.EntityRegistry,
client: MagicMock,
config_entry: MockConfigEntry,
integration_setup: Callable[[MagicMock], Awaitable[bool]],
appliance: HomeAppliance,
keys_to_check: tuple,
) -> None:
"""Test that devices reconnected.
@@ -173,9 +173,9 @@ async def test_connected_devices(
@pytest.mark.parametrize("appliance", ["Washer"], indirect=True)
async def test_button_entity_availability(
hass: HomeAssistant,
client: MagicMock,
config_entry: MockConfigEntry,
integration_setup: Callable[[MagicMock], Awaitable[bool]],
client: MagicMock,
appliance: HomeAppliance,
) -> None:
"""Test if button entities availability are based on the appliance connection state."""
@@ -237,9 +237,9 @@ async def test_button_entity_availability(
)
async def test_button_functionality(
hass: HomeAssistant,
client: MagicMock,
config_entry: MockConfigEntry,
integration_setup: Callable[[MagicMock], Awaitable[bool]],
client: MagicMock,
entity_id: str,
method_call: str,
expected_kwargs: dict[str, Any],
@@ -265,9 +265,9 @@ async def test_button_functionality(
async def test_command_button_exception(
hass: HomeAssistant,
client_with_exception: MagicMock,
config_entry: MockConfigEntry,
integration_setup: Callable[[MagicMock], Awaitable[bool]],
client_with_exception: MagicMock,
) -> None:
"""Test if button entities availability are based on the appliance connection state."""
entity_id = "button.washer_pause_program"
@@ -301,9 +301,9 @@ async def test_command_button_exception(
async def test_stop_program_button_exception(
hass: HomeAssistant,
client_with_exception: MagicMock,
config_entry: MockConfigEntry,
integration_setup: Callable[[MagicMock], Awaitable[bool]],
client_with_exception: MagicMock,
) -> None:
"""Test if button entities availability are based on the appliance connection state."""
entity_id = "button.washer_stop_program"