1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 22:18:40 +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

@@ -33,7 +33,7 @@ async def test_user_flow(hass: HomeAssistant, mock_epion: MagicMock) -> None:
)
await hass.async_block_till_done()
assert result["type"] == FlowResultType.CREATE_ENTRY
assert result["type"] is FlowResultType.CREATE_ENTRY
assert result["title"] == "Epion integration"
assert result["data"] == {
CONF_API_KEY: API_KEY,
@@ -63,7 +63,7 @@ async def test_form_exceptions(
{CONF_API_KEY: API_KEY},
)
assert result["type"] == FlowResultType.FORM
assert result["type"] is FlowResultType.FORM
assert result["errors"] == {"base": error}
mock_epion.return_value.get_current.side_effect = None
@@ -78,7 +78,7 @@ async def test_form_exceptions(
)
await hass.async_block_till_done()
assert result["type"] == FlowResultType.CREATE_ENTRY
assert result["type"] is FlowResultType.CREATE_ENTRY
assert result["title"] == "Epion integration"
assert result["data"] == {
CONF_API_KEY: API_KEY,
@@ -107,5 +107,5 @@ async def test_duplicate_entry(hass: HomeAssistant, mock_epion: MagicMock) -> No
)
await hass.async_block_till_done()
assert result["type"] == FlowResultType.ABORT
assert result["type"] is FlowResultType.ABORT
assert result["reason"] == "already_configured"