mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Refactor fibaro connect (#106875)
* Refactor fibaro connect * Remove obsolete test * Add comment about ignored return value
This commit is contained in:
@@ -89,36 +89,6 @@ async def test_config_flow_user_initiated_success(hass: HomeAssistant) -> None:
|
||||
}
|
||||
|
||||
|
||||
async def test_config_flow_user_initiated_connect_failure(
|
||||
hass: HomeAssistant, mock_fibaro_client: Mock
|
||||
) -> None:
|
||||
"""Connect failure in flow manually initialized by the user."""
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "user"
|
||||
assert result["errors"] == {}
|
||||
|
||||
mock_fibaro_client.connect.return_value = False
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
{
|
||||
CONF_URL: TEST_URL,
|
||||
CONF_USERNAME: TEST_USERNAME,
|
||||
CONF_PASSWORD: TEST_PASSWORD,
|
||||
},
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "user"
|
||||
assert result["errors"] == {"base": "cannot_connect"}
|
||||
|
||||
await _recovery_after_failure_works(hass, mock_fibaro_client, result)
|
||||
|
||||
|
||||
async def test_config_flow_user_initiated_auth_failure(
|
||||
hass: HomeAssistant, mock_fibaro_client: Mock
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user