From 202bed5d51fa5931cde153446c1b0acc3e6fe3e5 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 1 Mar 2023 02:07:46 -0600 Subject: [PATCH] Fix lingering reload task in notion reauth (#88949) Co-authored-by: Martin Hjelmare --- tests/components/notion/test_config_flow.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/components/notion/test_config_flow.py b/tests/components/notion/test_config_flow.py index de5c871ce53..d0d1cad0350 100644 --- a/tests/components/notion/test_config_flow.py +++ b/tests/components/notion/test_config_flow.py @@ -109,6 +109,11 @@ async def test_reauth( result = await hass.config_entries.flow.async_configure( result["flow_id"], user_input={CONF_PASSWORD: "password"} ) + # Block to ensure the setup_config_entry fixture does not + # get undone before hass is shutdown so we do not try + # to setup the config entry via reload. + await hass.async_block_till_done() + assert result["type"] == data_entry_flow.FlowResultType.ABORT assert result["reason"] == "reauth_successful" assert len(hass.config_entries.async_entries()) == 1