Remove last occurrences of RESULT_TYPE_* from codebase (#74670)

Remove last ocurrances of RESULT_TYPE_* from codebase
This commit is contained in:
Franck Nijhof 2022-07-07 22:35:06 +02:00 committed by GitHub
parent c6bff8ae18
commit 6ebdf0580b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View file

@ -5,7 +5,7 @@ from homeassistant import config_entries
from homeassistant.components.NEW_DOMAIN.config_flow import CannotConnect, InvalidAuth
from homeassistant.components.NEW_DOMAIN.const import DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import RESULT_TYPE_CREATE_ENTRY, RESULT_TYPE_FORM
from homeassistant.data_entry_flow import FlowResultType
async def test_form(hass: HomeAssistant) -> None:
@ -13,7 +13,7 @@ async def test_form(hass: HomeAssistant) -> None:
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
assert result["type"] == RESULT_TYPE_FORM
assert result["type"] == FlowResultType.FORM
assert result["errors"] is None
with patch(
@ -33,7 +33,7 @@ async def test_form(hass: HomeAssistant) -> None:
)
await hass.async_block_till_done()
assert result2["type"] == RESULT_TYPE_CREATE_ENTRY
assert result2["type"] == FlowResultType.CREATE_ENTRY
assert result2["title"] == "Name of the device"
assert result2["data"] == {
"host": "1.1.1.1",
@ -62,7 +62,7 @@ async def test_form_invalid_auth(hass: HomeAssistant) -> None:
},
)
assert result2["type"] == RESULT_TYPE_FORM
assert result2["type"] == FlowResultType.FORM
assert result2["errors"] == {"base": "invalid_auth"}
@ -85,5 +85,5 @@ async def test_form_cannot_connect(hass: HomeAssistant) -> None:
},
)
assert result2["type"] == RESULT_TYPE_FORM
assert result2["type"] == FlowResultType.FORM
assert result2["errors"] == {"base": "cannot_connect"}