Search/replace RESULT_TYPE_* by FlowResultType enum (#74656)
This commit is contained in:
parent
46beae9061
commit
a6244eea28
142 changed files with 1463 additions and 1849 deletions
|
@ -3,7 +3,7 @@ from unittest.mock import patch
|
|||
|
||||
from homeassistant.components.raspberry_pi.const import DOMAIN
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.data_entry_flow import RESULT_TYPE_ABORT, RESULT_TYPE_CREATE_ENTRY
|
||||
from homeassistant.data_entry_flow import FlowResultType
|
||||
|
||||
from tests.common import MockConfigEntry, MockModule, mock_integration
|
||||
|
||||
|
@ -20,7 +20,7 @@ async def test_config_flow(hass: HomeAssistant) -> None:
|
|||
DOMAIN, context={"source": "system"}
|
||||
)
|
||||
|
||||
assert result["type"] == RESULT_TYPE_CREATE_ENTRY
|
||||
assert result["type"] == FlowResultType.CREATE_ENTRY
|
||||
assert result["title"] == "Raspberry Pi"
|
||||
assert result["data"] == {}
|
||||
assert result["options"] == {}
|
||||
|
@ -53,6 +53,6 @@ async def test_config_flow_single_entry(hass: HomeAssistant) -> None:
|
|||
DOMAIN, context={"source": "system"}
|
||||
)
|
||||
|
||||
assert result["type"] == RESULT_TYPE_ABORT
|
||||
assert result["type"] == FlowResultType.ABORT
|
||||
assert result["reason"] == "single_instance_allowed"
|
||||
mock_setup_entry.assert_not_called()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue