From cd45c5d8860b57b783c1328175b14366b056bf6e Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Fri, 11 Apr 2025 15:37:47 +0200 Subject: [PATCH] Avoid Z-Wave config entry unload in test teardown (#142732) --- tests/components/zwave_js/test_config_flow.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/components/zwave_js/test_config_flow.py b/tests/components/zwave_js/test_config_flow.py index fe1a665c4b0..990c73c3aca 100644 --- a/tests/components/zwave_js/test_config_flow.py +++ b/tests/components/zwave_js/test_config_flow.py @@ -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( (