mirror of
https://github.com/home-assistant/core.git
synced 2025-11-14 21:40:16 +00:00
Move Home Connect entry state assertion at tests (#144027)
This commit is contained in:
committed by
GitHub
parent
abd17d9af9
commit
883ab44437
@@ -43,7 +43,6 @@ async def test_paired_depaired_devices_flow(
|
||||
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
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
|
||||
@@ -131,7 +130,6 @@ async def test_connected_devices(
|
||||
side_effect=get_available_commands_side_effect
|
||||
)
|
||||
client.get_all_programs = AsyncMock(side_effect=get_all_programs_side_effect)
|
||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
client.get_available_commands = get_available_commands_original_mock
|
||||
@@ -183,7 +181,6 @@ async def test_button_entity_availability(
|
||||
"button.washer_pause_program",
|
||||
"button.washer_stop_program",
|
||||
]
|
||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
|
||||
@@ -246,7 +243,6 @@ async def test_button_functionality(
|
||||
appliance: HomeAppliance,
|
||||
) -> None:
|
||||
"""Test if button entities availability are based on the appliance connection state."""
|
||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
|
||||
@@ -282,7 +278,6 @@ async def test_command_button_exception(
|
||||
]
|
||||
)
|
||||
)
|
||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client_with_exception)
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
|
||||
@@ -308,7 +303,6 @@ async def test_stop_program_button_exception(
|
||||
"""Test if button entities availability are based on the appliance connection state."""
|
||||
entity_id = "button.washer_stop_program"
|
||||
|
||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client_with_exception)
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
|
||||
|
||||
Reference in New Issue
Block a user