From 0fa5d6886d084dd942668c98ff04a2a0b65f7666 Mon Sep 17 00:00:00 2001 From: drc38 <20024196+drc38@users.noreply.github.com> Date: Thu, 26 Dec 2024 20:55:23 +1300 Subject: [PATCH] Update test_config_flow.py --- tests/test_config_flow.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_config_flow.py b/tests/test_config_flow.py index 845f4f6..3fed275 100644 --- a/tests/test_config_flow.py +++ b/tests/test_config_flow.py @@ -40,7 +40,7 @@ async def test_successful_config_flow(hass, bypass_get_data): ) # Check that the config flow shows the user form as the first step - assert result["type"] == data_entry_flow.RESULT_TYPE_FORM + assert result["type"] == data_entry_flow.FlowResultType.FORM assert result["step_id"] == "user" # If a user were to enter form it would result in this function call @@ -50,7 +50,7 @@ async def test_successful_config_flow(hass, bypass_get_data): # Check that the config flow is complete and a new entry is created with # the input data - assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY + assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY assert result["title"] == MOCK_CONFIG[CONF_HOST] assert result["data"] == MOCK_CONFIG assert result["result"] @@ -67,14 +67,14 @@ async def test_failed_config_flow(hass, error_on_get_data): 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" result = await hass.config_entries.flow.async_configure( 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": "auth"} @@ -91,7 +91,7 @@ async def test_options_flow(hass): result = await hass.config_entries.options.async_init(entry.entry_id) # Verify that the first options step is a user form - assert result["type"] == data_entry_flow.RESULT_TYPE_FORM + assert result["type"] == data_entry_flow.FlowResultType.FORM assert result["step_id"] == "user" # Enter some fake data into the form @@ -101,7 +101,7 @@ async def test_options_flow(hass): ) # Verify that the flow finishes - assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY + assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY assert result["title"] == MOCK_CONFIG[CONF_HOST] # Verify that the options were updated