Move Home Connect entry state assertion at tests (#144027)

This commit is contained in:
J. Diego Rodríguez Royo
2025-05-01 23:04:03 +02:00
committed by GitHub
parent abd17d9af9
commit 883ab44437
14 changed files with 2 additions and 94 deletions

View File

@@ -57,7 +57,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
@@ -135,7 +134,6 @@ async def test_connected_devices(
return await get_settings_original_mock.side_effect(ha_id)
client.get_settings = AsyncMock(side_effect=get_settings_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
@@ -181,7 +179,6 @@ async def test_time_entity_availability(
entity_ids = [
"time.oven_alarm_clock",
]
assert config_entry.state == ConfigEntryState.NOT_LOADED
assert await integration_setup(client)
assert config_entry.state == ConfigEntryState.LOADED
@@ -242,7 +239,6 @@ async def test_time_entity_functionality(
setting_key: SettingKey,
) -> None:
"""Test time entity functionality."""
assert config_entry.state is ConfigEntryState.NOT_LOADED
assert await integration_setup(client)
assert config_entry.state is ConfigEntryState.LOADED
@@ -296,7 +292,6 @@ async def test_time_entity_error(
)
]
)
assert config_entry.state is ConfigEntryState.NOT_LOADED
assert await integration_setup(client_with_exception)
assert config_entry.state is ConfigEntryState.LOADED
@@ -367,7 +362,6 @@ async def test_create_alarm_clock_deprecation_issue(
},
)
assert config_entry.state == ConfigEntryState.NOT_LOADED
assert await integration_setup(client)
assert config_entry.state == ConfigEntryState.LOADED
@@ -447,7 +441,6 @@ async def test_alarm_clock_deprecation_issue_fix(
},
)
assert config_entry.state == ConfigEntryState.NOT_LOADED
assert await integration_setup(client)
assert config_entry.state == ConfigEntryState.LOADED