mirror of
https://github.com/home-assistant/core.git
synced 2025-11-13 04:50:17 +00:00
Move Home Connect entry state assertion at tests (#144027)
This commit is contained in:
committed by
GitHub
parent
abd17d9af9
commit
883ab44437
@@ -46,7 +46,6 @@ async def test_entry_setup(
|
||||
integration_setup: Callable[[MagicMock], Awaitable[bool]],
|
||||
) -> None:
|
||||
"""Test setup and unload."""
|
||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
|
||||
@@ -182,7 +181,6 @@ async def test_client_error(
|
||||
"""Test client errors during setup integration."""
|
||||
client_with_exception.get_home_appliances.return_value = None
|
||||
client_with_exception.get_home_appliances.side_effect = exception
|
||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
||||
assert not await integration_setup(client_with_exception)
|
||||
assert config_entry.state == expected_state
|
||||
assert client_with_exception.get_home_appliances.call_count == 1
|
||||
@@ -239,7 +237,6 @@ async def test_required_program_or_at_least_an_option(
|
||||
) -> None:
|
||||
"Test that the set_program_and_options does raise an exception if no program nor options are set."
|
||||
|
||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
||||
assert await integration_setup(client)
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
|
||||
|
||||
Reference in New Issue
Block a user