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:
committed by
GitHub
parent
ee66f6ec8c
commit
9b41e3d124
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user