diff --git a/tests/test_config_flow.py b/tests/test_config_flow.py index 73c1b5a..2ef3926 100644 --- a/tests/test_config_flow.py +++ b/tests/test_config_flow.py @@ -26,7 +26,7 @@ def bypass_setup_fixture(): yield -# Here we simiulate a successful config flow from the backend. +# Here we simulate a successful config flow from the backend. # Note that we use the `bypass_get_data` fixture here because # we want the config flow validation to succeed during the test. async def test_successful_config_flow(hass: HomeAssistant, bypass_get_data): @@ -37,7 +37,7 @@ async def test_successful_config_flow(hass: HomeAssistant, 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 fill in all fields, it would result in this function call @@ -47,7 +47,7 @@ async def test_successful_config_flow(hass: HomeAssistant, 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_PORT] assert result["data"] == MOCK_CONFIG assert result["result"] @@ -64,14 +64,14 @@ async def test_failed_config_flow(hass: HomeAssistant, 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 "base" in result["errors"] @@ -87,7 +87,7 @@ async def test_options_flow(hass: HomeAssistant): 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 @@ -97,7 +97,7 @@ async def test_options_flow(hass: HomeAssistant): ) # 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_PORT] # Verify that the options were updated