mirror of
https://github.com/home-assistant/core.git
synced 2026-09-28 02:18:10 -04:00
Add return code to integration application credentials in config flow (#71986)
* Add return code to integration application credentials in config flow * Update google tests to use new return code * Update spotify test for no auth configured * Add translation for oauth2_missing_credentials * Add new return code to yolink * Update homeassistant/strings.json Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Franck Nijhof <frenck@frenck.nl> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
co-authored by
Martin Hjelmare
Franck Nijhof
parent
23cb5cfd3f
commit
26ee289be3
@@ -327,7 +327,7 @@ async def test_missing_configuration(
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
assert result.get("type") == "abort"
|
||||
assert result.get("reason") == "missing_configuration"
|
||||
assert result.get("reason") == "missing_credentials"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("google_config", [None])
|
||||
@@ -342,7 +342,7 @@ async def test_missing_configuration_yaml_empty(
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
assert result.get("type") == "abort"
|
||||
assert result.get("reason") == "missing_configuration"
|
||||
assert result.get("reason") == "missing_credentials"
|
||||
|
||||
|
||||
async def test_wrong_configuration(
|
||||
|
||||
@@ -31,14 +31,14 @@ async def test_abort_if_no_configuration(hass):
|
||||
)
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "missing_configuration"
|
||||
assert result["reason"] == "missing_credentials"
|
||||
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": SOURCE_ZEROCONF}, data=BLANK_ZEROCONF_INFO
|
||||
)
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "missing_configuration"
|
||||
assert result["reason"] == "missing_credentials"
|
||||
|
||||
|
||||
async def test_zeroconf_abort_if_existing_entry(hass):
|
||||
|
||||
@@ -25,7 +25,7 @@ async def test_abort_if_no_configuration(hass):
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "missing_configuration"
|
||||
assert result["reason"] == "missing_credentials"
|
||||
|
||||
|
||||
async def test_abort_if_existing_entry(hass: HomeAssistant):
|
||||
|
||||
Reference in New Issue
Block a user