1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Use is in enum comparison in config flow tests A-E (#114669)

This commit is contained in:
Joost Lekkerkerker
2024-04-02 23:22:05 +02:00
committed by GitHub
parent ee66f6ec8c
commit 9b41e3d124
123 changed files with 1413 additions and 1387 deletions

View File

@@ -32,7 +32,7 @@ async def test_form(
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
assert result["type"] == FlowResultType.FORM
assert result["type"] is FlowResultType.FORM
assert result["errors"] == {}
result = await hass.config_entries.flow.async_init(
@@ -44,7 +44,7 @@ async def test_form(
)
await hass.async_block_till_done()
assert result["type"] == FlowResultType.CREATE_ENTRY
assert result["type"] is FlowResultType.CREATE_ENTRY
assert result["title"] == MOCK_DATA_STEP["email"]
assert result["data"] == MOCK_DATA_STEP
assert len(mock_setup_entry.mock_calls) == 1
@@ -73,7 +73,7 @@ async def test_flow_user_init_data_unknown_error_and_recover(
user_input=MOCK_DATA_STEP,
)
assert result["type"] == FlowResultType.FORM
assert result["type"] is FlowResultType.FORM
assert result["errors"]["base"] == text_error
# Recover
@@ -110,5 +110,5 @@ async def test_flow_user_init_data_already_configured(
user_input=MOCK_DATA_STEP,
)
assert result["type"] == FlowResultType.ABORT
assert result["type"] is FlowResultType.ABORT
assert result["reason"] == "already_configured"