mirror of
https://github.com/home-assistant/core.git
synced 2025-11-14 05:20:17 +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:
@@ -1,9 +1,10 @@
|
||||
"""Test the init file of IFTTT."""
|
||||
|
||||
from homeassistant import config_entries, data_entry_flow
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components import ifttt
|
||||
from homeassistant.config import async_process_ha_core_config
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.data_entry_flow import FlowResultType
|
||||
|
||||
from tests.typing import ClientSessionGenerator
|
||||
|
||||
@@ -20,10 +21,10 @@ async def test_config_flow_registers_webhook(
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
"ifttt", context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
assert result["type"] == data_entry_flow.FlowResultType.FORM, result
|
||||
assert result["type"] is FlowResultType.FORM, result
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(result["flow_id"], {})
|
||||
assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY
|
||||
assert result["type"] is FlowResultType.CREATE_ENTRY
|
||||
webhook_id = result["result"].data["webhook_id"]
|
||||
|
||||
ifttt_events = []
|
||||
|
||||
Reference in New Issue
Block a user