Use is in enum comparison in config flow tests F-J (#114670)

* Use right enum expression F-J

* Fix
This commit is contained in:
Joost Lekkerkerker 2024-04-02 23:01:37 +02:00 committed by GitHub
parent ea2bb24484
commit 906d3198e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
93 changed files with 1240 additions and 1220 deletions

View file

@ -60,7 +60,7 @@ async def test_full_user_flow_implementation(
)
assert result["step_id"] == "device"
assert result["type"] == FlowResultType.SHOW_PROGRESS
assert result["type"] is FlowResultType.SHOW_PROGRESS
# Wait for the task to start before configuring
await hass.async_block_till_done()
@ -74,7 +74,7 @@ async def test_full_user_flow_implementation(
)
assert result["title"] == ""
assert result["type"] == FlowResultType.CREATE_ENTRY
assert result["type"] is FlowResultType.CREATE_ENTRY
assert "data" in result
assert result["data"][CONF_ACCESS_TOKEN] == MOCK_ACCESS_TOKEN
assert "options" in result
@ -94,7 +94,7 @@ async def test_flow_with_registration_failure(
DOMAIN,
context={"source": config_entries.SOURCE_USER},
)
assert result["type"] == FlowResultType.ABORT
assert result["type"] is FlowResultType.ABORT
assert result.get("reason") == "could_not_register"
@ -123,11 +123,11 @@ async def test_flow_with_activation_failure(
context={"source": config_entries.SOURCE_USER},
)
assert result["step_id"] == "device"
assert result["type"] == FlowResultType.SHOW_PROGRESS
assert result["type"] is FlowResultType.SHOW_PROGRESS
await hass.async_block_till_done()
result = await hass.config_entries.flow.async_configure(result["flow_id"])
assert result["type"] == FlowResultType.ABORT
assert result["type"] is FlowResultType.ABORT
assert result["reason"] == "could_not_register"
@ -157,7 +157,7 @@ async def test_flow_with_remove_while_activating(
context={"source": config_entries.SOURCE_USER},
)
assert result["step_id"] == "device"
assert result["type"] == FlowResultType.SHOW_PROGRESS
assert result["type"] is FlowResultType.SHOW_PROGRESS
assert hass.config_entries.flow.async_get(result["flow_id"])
@ -181,7 +181,7 @@ async def test_already_configured(
context={"source": config_entries.SOURCE_USER},
)
assert result["type"] == FlowResultType.ABORT
assert result["type"] is FlowResultType.ABORT
assert result.get("reason") == "already_configured"