mirror of
https://github.com/home-assistant/core.git
synced 2025-11-15 22:10:09 +00:00
Use is in enum comparison in config flow tests P-T (#114675)
This commit is contained in:
committed by
GitHub
parent
5d500cb74b
commit
ee66f6ec8c
@@ -56,7 +56,7 @@ async def test_form(hass: HomeAssistant, test_cucode_in_coordinator_data) -> Non
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert result2["type"] == FlowResultType.CREATE_ENTRY
|
||||
assert result2["type"] is FlowResultType.CREATE_ENTRY
|
||||
assert result2["title"] == "1.1.1.1"
|
||||
assert result2["data"] == {
|
||||
CONF_HOST: "1.1.1.1",
|
||||
@@ -84,7 +84,7 @@ async def test_form_invalid_auth(hass: HomeAssistant) -> None:
|
||||
},
|
||||
)
|
||||
|
||||
assert result2["type"] == FlowResultType.FORM
|
||||
assert result2["type"] is FlowResultType.FORM
|
||||
assert result2["errors"] == {"base": "invalid_auth"}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ async def test_form_cannot_connect(hass: HomeAssistant) -> None:
|
||||
},
|
||||
)
|
||||
|
||||
assert result2["type"] == FlowResultType.FORM
|
||||
assert result2["type"] is FlowResultType.FORM
|
||||
assert result2["errors"] == {"base": "cannot_connect"}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ async def test_form_unknown_error(hass: HomeAssistant) -> None:
|
||||
},
|
||||
)
|
||||
|
||||
assert form_result["type"] == FlowResultType.FORM
|
||||
assert form_result["type"] is FlowResultType.FORM
|
||||
assert form_result["errors"] == {"base": "unknown"}
|
||||
|
||||
|
||||
@@ -177,5 +177,5 @@ async def test_form_entry_exists(hass: HomeAssistant) -> None:
|
||||
},
|
||||
)
|
||||
|
||||
assert form_result["type"] == FlowResultType.ABORT
|
||||
assert form_result["type"] is FlowResultType.ABORT
|
||||
assert form_result["reason"] == "already_configured"
|
||||
|
||||
Reference in New Issue
Block a user