Search/replace RESULT_TYPE_* by FlowResultType enum (#74642)
This commit is contained in:
parent
68ccb96089
commit
7cd68381f1
237 changed files with 2284 additions and 2280 deletions
|
@ -45,7 +45,7 @@ async def test_flow_successful(hass: HomeAssistant) -> None:
|
|||
result["flow_id"],
|
||||
user_input=MOCK_CONFIG,
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
|
||||
assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY
|
||||
assert result["title"] == "simplepush"
|
||||
assert result["data"] == MOCK_CONFIG
|
||||
|
||||
|
@ -61,7 +61,7 @@ async def test_flow_with_password(hass: HomeAssistant) -> None:
|
|||
result["flow_id"],
|
||||
user_input=mock_config_pass,
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
|
||||
assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY
|
||||
assert result["title"] == "simplepush"
|
||||
assert result["data"] == mock_config_pass
|
||||
|
||||
|
@ -84,7 +84,7 @@ async def test_flow_user_device_key_already_configured(hass: HomeAssistant) -> N
|
|||
result["flow_id"],
|
||||
user_input=MOCK_CONFIG,
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["type"] == data_entry_flow.FlowResultType.ABORT
|
||||
assert result["reason"] == "already_configured"
|
||||
|
||||
|
||||
|
@ -109,7 +109,7 @@ async def test_flow_user_name_already_configured(hass: HomeAssistant) -> None:
|
|||
result["flow_id"],
|
||||
user_input=MOCK_CONFIG,
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["type"] == data_entry_flow.FlowResultType.ABORT
|
||||
assert result["reason"] == "already_configured"
|
||||
|
||||
|
||||
|
@ -127,7 +127,7 @@ async def test_error_on_connection_failure(hass: HomeAssistant) -> None:
|
|||
result["flow_id"],
|
||||
user_input=MOCK_CONFIG,
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["type"] == data_entry_flow.FlowResultType.FORM
|
||||
assert result["errors"] == {"base": "cannot_connect"}
|
||||
|
||||
|
||||
|
@ -139,6 +139,6 @@ async def test_flow_import(hass: HomeAssistant) -> None:
|
|||
data=MOCK_CONFIG,
|
||||
)
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
|
||||
assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY
|
||||
assert result["title"] == "simplepush"
|
||||
assert result["data"] == MOCK_CONFIG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue