1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 05:26:47 +00:00

Use is in enum comparison in config flow tests K-O (#114672)

This commit is contained in:
Joost Lekkerkerker
2024-04-02 23:21:42 +02:00
committed by GitHub
parent 3875533f95
commit 5d500cb74b
107 changed files with 1177 additions and 1147 deletions

View File

@@ -6,10 +6,11 @@ from unittest.mock import AsyncMock, Mock, patch
from aiohttp import ClientConnectorError, ClientResponseError
import pytest
from homeassistant import config_entries, data_entry_flow
from homeassistant import config_entries
from homeassistant.components.kmtronic.const import CONF_REVERSE, DOMAIN
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType
from tests.common import MockConfigEntry
from tests.test_util.aiohttp import AiohttpClientMocker
@@ -74,14 +75,14 @@ async def test_form_options(
assert config_entry.state is ConfigEntryState.LOADED
result = await hass.config_entries.options.async_init(config_entry.entry_id)
assert result["type"] == data_entry_flow.FlowResultType.FORM
assert result["type"] is FlowResultType.FORM
assert result["step_id"] == "init"
result = await hass.config_entries.options.async_configure(
result["flow_id"], user_input={CONF_REVERSE: True}
)
assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY
assert result["type"] is FlowResultType.CREATE_ENTRY
assert config_entry.options == {CONF_REVERSE: True}
await hass.async_block_till_done()