Search/replace RESULT_TYPE_* by FlowResultType enum (#74656)

This commit is contained in:
Franck Nijhof 2022-07-07 21:28:18 +02:00 committed by GitHub
parent 46beae9061
commit a6244eea28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
142 changed files with 1463 additions and 1849 deletions

View file

@ -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