mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Use FlowResultType enum in Tuya tests (#74596)
This commit is contained in:
parent
19f33d205c
commit
4fcf8280f6
@ -84,7 +84,7 @@ async def test_user_flow(
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["type"] == data_entry_flow.FlowResultType.FORM
|
||||
assert result["step_id"] == "user"
|
||||
|
||||
tuya().connect = MagicMock(side_effect=side_effects)
|
||||
@ -95,7 +95,7 @@ async def test_user_flow(
|
||||
|
||||
country = [country for country in TUYA_COUNTRIES if country.name == MOCK_COUNTRY][0]
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
|
||||
assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY
|
||||
assert result["title"] == MOCK_USERNAME
|
||||
assert result["data"][CONF_ACCESS_ID] == MOCK_ACCESS_ID
|
||||
assert result["data"][CONF_ACCESS_SECRET] == MOCK_ACCESS_SECRET
|
||||
@ -115,7 +115,7 @@ async def test_error_on_invalid_credentials(hass, tuya):
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["type"] == data_entry_flow.FlowResultType.FORM
|
||||
assert result["step_id"] == "user"
|
||||
|
||||
tuya().connect = MagicMock(return_value=RESPONSE_ERROR)
|
||||
|
Loading…
x
Reference in New Issue
Block a user