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
@@ -80,7 +80,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
|
||||
|
||||
@@ -159,7 +158,6 @@ async def test_connected_devices(
|
||||
return get_settings_original_mock.return_value
|
||||
|
||||
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
|
||||
@@ -209,7 +207,6 @@ async def test_number_entity_availability(
|
||||
# Setting constrains are not needed for this test
|
||||
# so we rise an error to easily test the availability
|
||||
client.get_setting = AsyncMock(side_effect=HomeConnectError())
|
||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
|
||||
@@ -316,7 +313,6 @@ async def test_number_entity_functionality(
|
||||
)
|
||||
)
|
||||
|
||||
assert config_entry.state is ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state is ConfigEntryState.LOADED
|
||||
entity_state = hass.states.get(entity_id)
|
||||
@@ -420,7 +416,6 @@ async def test_fetch_constraints_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()
|
||||
@@ -472,7 +467,6 @@ async def test_number_entity_error(
|
||||
)
|
||||
]
|
||||
)
|
||||
assert config_entry.state is ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client_with_exception)
|
||||
assert config_entry.state is ConfigEntryState.LOADED
|
||||
|
||||
@@ -599,7 +593,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