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:
parent
04e5086e01
commit
24f83c5890
25 changed files with 165 additions and 147 deletions
|
@ -5,13 +5,14 @@ from unittest.mock import patch
|
|||
|
||||
import pytest
|
||||
|
||||
from homeassistant import config_entries, data_entry_flow
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components import gpslogger, zone
|
||||
from homeassistant.components.device_tracker import DOMAIN as DEVICE_TRACKER_DOMAIN
|
||||
from homeassistant.components.gpslogger import DOMAIN, TRACKER_UPDATE
|
||||
from homeassistant.config import async_process_ha_core_config
|
||||
from homeassistant.const import STATE_HOME, STATE_NOT_HOME
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.data_entry_flow import FlowResultType
|
||||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||
from homeassistant.helpers.dispatcher import DATA_DISPATCHER
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
@ -65,10 +66,10 @@ async def webhook_id(hass, gpslogger_client):
|
|||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, 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
|
||||
|
||||
await hass.async_block_till_done()
|
||||
return result["result"].data["webhook_id"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue