diff --git a/tests/components/comelit/test_config_flow.py b/tests/components/comelit/test_config_flow.py index f17c46c6f5b..0a0dc04eae0 100644 --- a/tests/components/comelit/test_config_flow.py +++ b/tests/components/comelit/test_config_flow.py @@ -65,8 +65,8 @@ async def test_exception_connection(hass: HomeAssistant, side_effect, error) -> result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER} ) - assert result["type"] == FlowResultType.FORM - assert result["step_id"] == "user" + assert result.get("type") == FlowResultType.FORM + assert result.get("step_id") == "user" with patch( "aiocomelit.api.ComeliteSerialBridgeApi.login", @@ -82,6 +82,7 @@ async def test_exception_connection(hass: HomeAssistant, side_effect, error) -> assert result["type"] == FlowResultType.FORM assert result["step_id"] == "user" + assert result["errors"] is not None assert result["errors"]["base"] == error @@ -158,4 +159,5 @@ async def test_reauth_not_successful(hass: HomeAssistant, side_effect, error) -> assert result["type"] == FlowResultType.FORM assert result["step_id"] == "reauth_confirm" + assert result["errors"] is not None assert result["errors"]["base"] == error