Avoid Z-Wave config entry unload in test teardown (#142732)

This commit is contained in:
Martin Hjelmare 2025-04-11 15:37:47 +02:00 committed by GitHub
parent 2af6ee7584
commit cd45c5d886
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2101,6 +2101,10 @@ async def test_options_not_addon_with_addon(
assert setup_entry.call_count == 1
assert unload_entry.call_count == 1
# avoid unload entry in teardown
await hass.config_entries.async_unload(entry.entry_id)
assert entry.state is config_entries.ConfigEntryState.NOT_LOADED
@pytest.mark.usefixtures("supervisor")
async def test_options_not_addon_with_addon_stop_fail(
@ -2144,6 +2148,10 @@ async def test_options_not_addon_with_addon_stop_fail(
assert setup_entry.call_count == 1
assert unload_entry.call_count == 1
# avoid unload entry in teardown
await hass.config_entries.async_unload(entry.entry_id)
assert entry.state is config_entries.ConfigEntryState.NOT_LOADED
@pytest.mark.parametrize(
(