Code quality for Comelit tests (#109077)
parent
b9f48f62de
commit
03df4fde97
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue