Raise error when unsupported (old) Bond firmware is detected (#38650)
This commit is contained in:
1 parent
4cceb4ad0a
commit
50cd6be18d
4 files changed
+26
-2
No files matched your search
@@ -79,6 +79,24 @@ async def test_user_form_cannot_connect(hass: core.HomeAssistant):
|
||||
assert result2["errors"] == {"base": "cannot_connect"}
|
||||
|
||||
|
||||
async def test_user_form_old_firmware(hass: core.HomeAssistant):
|
||||
"""Test we handle unsupported old firmware."""
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
|
||||
with patch_bond_version(
|
||||
return_value={"no_bond_id": "present"}
|
||||
), patch_bond_device_ids():
|
||||
result2 = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
{CONF_HOST: "some host", CONF_ACCESS_TOKEN: "test-token"},
|
||||
)
|
||||
|
||||
assert result2["type"] == "form"
|
||||
assert result2["errors"] == {"base": "old_firmware"}
|
||||
|
||||
|
||||
async def test_user_form_unexpected_client_error(hass: core.HomeAssistant):
|
||||
"""Test we handle unexpected client error gracefully."""
|
||||
await _help_test_form_unexpected_error(
|
||||
|
||||
Reference in new issue
Block a user