Use common strings for velbus config flow (#40660)
This commit is contained in:
1 parent
27350f41c9
commit
30effb5c8a
3 files changed
+12
-10
No files matched your search
@@ -65,13 +65,13 @@ async def test_user_fail(hass, controller_assert):
|
||||
{CONF_NAME: "Velbus Test Serial", CONF_PORT: PORT_SERIAL}
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["errors"] == {CONF_PORT: "connection_failed"}
|
||||
assert result["errors"] == {CONF_PORT: "cannot_connect"}
|
||||
|
||||
result = await flow.async_step_user(
|
||||
{CONF_NAME: "Velbus Test TCP", CONF_PORT: PORT_TCP}
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["errors"] == {CONF_PORT: "connection_failed"}
|
||||
assert result["errors"] == {CONF_PORT: "cannot_connect"}
|
||||
|
||||
|
||||
async def test_import(hass, controller):
|
||||
@@ -94,10 +94,10 @@ async def test_abort_if_already_setup(hass):
|
||||
{CONF_PORT: PORT_TCP, CONF_NAME: "velbus import test"}
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "port_exists"
|
||||
assert result["reason"] == "already_configured"
|
||||
|
||||
result = await flow.async_step_user(
|
||||
{CONF_PORT: PORT_TCP, CONF_NAME: "velbus import test"}
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["errors"] == {"port": "port_exists"}
|
||||
assert result["errors"] == {"port": "already_configured"}
|
||||
Reference in new issue
Block a user