From 80e4f191720a2a50c7fc8075477fc3576a1bd513 Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Wed, 30 Apr 2025 16:14:44 +0200 Subject: [PATCH] Fix Z-Wave USB flow test warning (#143956) --- tests/components/zwave_js/test_config_flow.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/components/zwave_js/test_config_flow.py b/tests/components/zwave_js/test_config_flow.py index 8256e10e697..1d8b997ea4d 100644 --- a/tests/components/zwave_js/test_config_flow.py +++ b/tests/components/zwave_js/test_config_flow.py @@ -1210,7 +1210,7 @@ async def test_abort_usb_discovery_with_existing_flow( assert result2["reason"] == "already_in_progress" -@pytest.mark.usefixtures("supervisor", "addon_options") +@pytest.mark.usefixtures("supervisor", "addon_installed") async def test_usb_discovery_with_existing_usb_flow(hass: HomeAssistant) -> None: """Test usb discovery allows more than one USB flow in progress.""" first_usb_info = UsbServiceInfo( @@ -1244,6 +1244,11 @@ async def test_usb_discovery_with_existing_usb_flow(hass: HomeAssistant) -> None assert len(usb_flows_in_progress) == 2 + for flow in (result, result2): + hass.config_entries.flow.async_abort(flow["flow_id"]) + + assert len(hass.config_entries.flow.async_progress()) == 0 + async def test_abort_usb_discovery_addon_required( hass: HomeAssistant, supervisor, addon_options