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
|
@ -6,7 +6,7 @@ from pytest import mark
|
|||
from homeassistant import config_entries
|
||||
from homeassistant.components.prosegur.config_flow import CannotConnect, InvalidAuth
|
||||
from homeassistant.components.prosegur.const import DOMAIN
|
||||
from homeassistant.data_entry_flow import RESULT_TYPE_ABORT, RESULT_TYPE_FORM
|
||||
from homeassistant.data_entry_flow import FlowResultType
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
|
@ -145,7 +145,7 @@ async def test_reauth_flow(hass):
|
|||
data=entry.data,
|
||||
)
|
||||
assert result["step_id"] == "reauth_confirm"
|
||||
assert result["type"] == RESULT_TYPE_FORM
|
||||
assert result["type"] == FlowResultType.FORM
|
||||
assert result["errors"] == {}
|
||||
|
||||
install = MagicMock()
|
||||
|
@ -167,7 +167,7 @@ async def test_reauth_flow(hass):
|
|||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert result2["type"] == RESULT_TYPE_ABORT
|
||||
assert result2["type"] == FlowResultType.ABORT
|
||||
assert result2["reason"] == "reauth_successful"
|
||||
assert entry.data == {
|
||||
"country": "PT",
|
||||
|
@ -223,5 +223,5 @@ async def test_reauth_flow_error(hass, exception, base_error):
|
|||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert result2["type"] == RESULT_TYPE_FORM
|
||||
assert result2["type"] == FlowResultType.FORM
|
||||
assert result2["errors"]["base"] == base_error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue