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
|
@ -7,7 +7,7 @@ from unittest.mock import Mock, patch
|
|||
|
||||
import pytest
|
||||
|
||||
from homeassistant import config_entries, data_entry_flow
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components import sonos, zeroconf
|
||||
from homeassistant.components.sonos import SonosDiscoveryManager
|
||||
from homeassistant.components.sonos.const import (
|
||||
|
@ -16,6 +16,7 @@ from homeassistant.components.sonos.const import (
|
|||
)
|
||||
from homeassistant.components.sonos.exception import SonosUpdateError
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.data_entry_flow import FlowResultType
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
@ -46,10 +47,10 @@ async def test_creating_entry_sets_up_media_player(
|
|||
)
|
||||
|
||||
# Confirmation form
|
||||
assert result["type"] == data_entry_flow.FlowResultType.FORM
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
|
||||
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(wait_background_tasks=True)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue