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

Use is in FlowResultType enum comparison in tests (#114917)

* Use is in FlowResultType enum comparison in tests

* Adjust auth

* Adjust systemmonitor

* Once more

* Add comment
This commit is contained in:
epenet
2024-04-05 10:40:14 +02:00
committed by GitHub
parent 04e5086e01
commit 24f83c5890
25 changed files with 165 additions and 147 deletions

View File

@@ -94,7 +94,8 @@ async def test_migrate_process_sensor(
assert resp.status == HTTPStatus.OK
data = await resp.json()
assert data["type"] == FlowResultType.CREATE_ENTRY
# Cannot use identity `is` check here as the value is parsed from JSON
assert data["type"] == FlowResultType.CREATE_ENTRY.value
await hass.async_block_till_done()
state = hass.states.get("binary_sensor.system_monitor_process_python3")
@@ -192,5 +193,6 @@ async def test_other_fixable_issues(
assert resp.status == HTTPStatus.OK
data = await resp.json()
assert data["type"] == FlowResultType.CREATE_ENTRY
# Cannot use identity `is` check here as the value is parsed from JSON
assert data["type"] == FlowResultType.CREATE_ENTRY.value
await hass.async_block_till_done()