Remove configuration.yaml support for the velbus component (#60411)

This commit is contained in:
Maikel Punie
2021-11-29 16:33:26 +01:00
committed by GitHub
parent c407e24a18
commit f18fe342ac
3 changed files with 4 additions and 58 deletions

View File

@@ -77,29 +77,11 @@ async def test_user_fail(hass: HomeAssistant):
assert result["errors"] == {CONF_PORT: "cannot_connect"}
@pytest.mark.usefixtures("controller")
async def test_import(hass: HomeAssistant):
"""Test import step."""
flow = init_config_flow(hass)
result = await flow.async_step_import({CONF_PORT: PORT_TCP})
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
assert result["title"] == "velbus_import"
@pytest.mark.usefixtures("config_entry")
async def test_abort_if_already_setup(hass: HomeAssistant):
"""Test we abort if Daikin is already setup."""
"""Test we abort if Velbus is already setup."""
flow = init_config_flow(hass)
result = await flow.async_step_import(
{CONF_PORT: PORT_TCP, CONF_NAME: "velbus import test"}
)
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
assert result["reason"] == "already_configured"
result = await flow.async_step_user(
{CONF_PORT: PORT_TCP, CONF_NAME: "velbus import test"}
)
result = await flow.async_step_user({CONF_PORT: PORT_TCP, CONF_NAME: "velbus test"})
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
assert result["errors"] == {"port": "already_configured"}