mirror of
https://github.com/home-assistant/core.git
synced 2025-11-24 02:07:01 +00:00
Move Home Connect entry state assertion at tests (#144027)
This commit is contained in:
committed by
GitHub
parent
abd17d9af9
commit
883ab44437
@@ -84,7 +84,6 @@ async def test_paired_depaired_devices_flow(
|
||||
],
|
||||
)
|
||||
)
|
||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
|
||||
@@ -174,7 +173,6 @@ async def test_connected_devices(
|
||||
|
||||
client.get_settings = AsyncMock(side_effect=get_settings_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_settings = get_settings_original_mock
|
||||
@@ -220,7 +218,6 @@ async def test_select_entity_availability(
|
||||
entity_ids = [
|
||||
"select.washer_active_program",
|
||||
]
|
||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
|
||||
@@ -298,7 +295,6 @@ async def test_filter_programs(
|
||||
]
|
||||
)
|
||||
|
||||
assert config_entry.state is ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state is ConfigEntryState.LOADED
|
||||
|
||||
@@ -365,7 +361,6 @@ async def test_select_program_functionality(
|
||||
event_key: EventKey,
|
||||
) -> None:
|
||||
"""Test select functionality."""
|
||||
assert config_entry.state is ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state is ConfigEntryState.LOADED
|
||||
|
||||
@@ -448,7 +443,6 @@ async def test_select_exception_handling(
|
||||
]
|
||||
)
|
||||
|
||||
assert config_entry.state is ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client_with_exception)
|
||||
assert config_entry.state is ConfigEntryState.LOADED
|
||||
|
||||
@@ -494,7 +488,6 @@ async def test_programs_updated_on_connect(
|
||||
return await get_all_programs_mock.side_effect(ha_id)
|
||||
|
||||
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_all_programs = get_all_programs_mock
|
||||
@@ -566,7 +559,6 @@ async def test_select_functionality(
|
||||
expected_value_call_arg: str,
|
||||
) -> None:
|
||||
"""Test select functionality."""
|
||||
assert config_entry.state is ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state is ConfigEntryState.LOADED
|
||||
|
||||
@@ -646,7 +638,6 @@ async def test_fetch_allowed_values(
|
||||
|
||||
client.get_setting = AsyncMock(side_effect=get_setting_side_effect)
|
||||
|
||||
assert config_entry.state is ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state is ConfigEntryState.LOADED
|
||||
|
||||
@@ -713,7 +704,6 @@ async def test_fetch_allowed_values_after_rate_limit_error(
|
||||
]
|
||||
)
|
||||
|
||||
assert config_entry.state is ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
async_fire_time_changed(hass)
|
||||
await hass.async_block_till_done()
|
||||
@@ -775,7 +765,6 @@ async def test_default_values_after_fetch_allowed_values_error(
|
||||
client.get_settings = AsyncMock(side_effect=get_settings_side_effect)
|
||||
client.get_setting = AsyncMock(side_effect=exception)
|
||||
|
||||
assert config_entry.state is ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state is ConfigEntryState.LOADED
|
||||
|
||||
@@ -821,7 +810,6 @@ async def test_select_entity_error(
|
||||
)
|
||||
]
|
||||
)
|
||||
assert config_entry.state is ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client_with_exception)
|
||||
assert config_entry.state is ConfigEntryState.LOADED
|
||||
|
||||
@@ -952,7 +940,6 @@ async def test_options_functionality(
|
||||
)
|
||||
)
|
||||
|
||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
entity_state = hass.states.get(entity_id)
|
||||
|
||||
Reference in New Issue
Block a user