From e08de2273790ae4b9a39c2c0f47bce5a77345b1e Mon Sep 17 00:00:00 2001 From: jjlawren Date: Thu, 27 May 2021 21:30:37 -0500 Subject: [PATCH] Fix totalconnect test calling public host (#51138) --- tests/components/totalconnect/test_config_flow.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/components/totalconnect/test_config_flow.py b/tests/components/totalconnect/test_config_flow.py index 3751abfc361..7b80996db14 100644 --- a/tests/components/totalconnect/test_config_flow.py +++ b/tests/components/totalconnect/test_config_flow.py @@ -135,15 +135,14 @@ async def test_reauth(hass): result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_REAUTH}, data=entry.data ) - assert result["step_id"] == "reauth_confirm" - - result = await hass.config_entries.flow.async_configure(result["flow_id"]) assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["step_id"] == "reauth_confirm" with patch( "homeassistant.components.totalconnect.config_flow.TotalConnectClient.TotalConnectClient" - ) as client_mock: + ) as client_mock, patch( + "homeassistant.components.totalconnect.async_setup_entry", return_value=True + ): # first test with an invalid password client_mock.return_value.is_valid_credentials.return_value = False @@ -162,5 +161,6 @@ async def test_reauth(hass): ) assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT assert result["reason"] == "reauth_successful" + await hass.async_block_till_done() assert len(hass.config_entries.async_entries()) == 1