Use common strings in Nest config flow (#41597)
This commit is contained in:
parent
ef448f1549
commit
1c4512bc40
3 changed files with 15 additions and 15 deletions
|
@ -17,10 +17,10 @@ async def test_abort_if_no_implementation_registered(hass):
|
|||
result = await flow.async_step_init()
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "no_flows"
|
||||
assert result["reason"] == "missing_configuration"
|
||||
|
||||
|
||||
async def test_abort_if_already_setup(hass):
|
||||
async def test_abort_if_single_instance_allowed(hass):
|
||||
"""Test we abort if Nest is already setup."""
|
||||
flow = config_flow.NestFlowHandler()
|
||||
flow.hass = hass
|
||||
|
@ -29,7 +29,7 @@ async def test_abort_if_already_setup(hass):
|
|||
result = await flow.async_step_init()
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "already_setup"
|
||||
assert result["reason"] == "single_instance_allowed"
|
||||
|
||||
|
||||
async def test_full_flow_implementation(hass):
|
||||
|
@ -140,7 +140,7 @@ async def test_verify_code_invalid(hass):
|
|||
result = await flow.async_step_link({"code": "123ABC"})
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["step_id"] == "link"
|
||||
assert result["errors"] == {"code": "invalid_code"}
|
||||
assert result["errors"] == {"code": "invalid_pin"}
|
||||
|
||||
|
||||
async def test_verify_code_unknown_error(hass):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue