Use FlowResultType enum in config flow tests A-M (#114681)

This commit is contained in:
Joost Lekkerkerker
2024-04-03 09:21:17 +02:00
committed by GitHub
parent a767530970
commit b9281327c4
111 changed files with 997 additions and 961 deletions

View File

@@ -51,7 +51,7 @@ async def test_setup_in_bridge_mode(hass: HomeAssistant, mock_get_source_ip) ->
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
assert result["type"] == "form"
assert result["type"] is FlowResultType.FORM
assert result["errors"] is None
result2 = await hass.config_entries.flow.async_configure(
@@ -113,7 +113,7 @@ async def test_setup_in_bridge_mode_name_taken(
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
assert result["type"] == "form"
assert result["type"] is FlowResultType.FORM
assert result["errors"] is None
result2 = await hass.config_entries.flow.async_configure(
@@ -199,7 +199,7 @@ async def test_setup_creates_entries_for_accessory_mode_devices(
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
assert result["type"] == "form"
assert result["type"] is FlowResultType.FORM
assert result["errors"] is None
result2 = await hass.config_entries.flow.async_configure(
@@ -1290,7 +1290,7 @@ async def test_converting_bridge_to_accessory_mode(
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
assert result["type"] == "form"
assert result["type"] is FlowResultType.FORM
assert result["errors"] is None
result2 = await hass.config_entries.flow.async_configure(