Use common strings in Nest config flow (#41597)

This commit is contained in:
Christian Bilevits authored and GitHub committed 2020-10-11 14:47:30 +02:00
1 parent ef448f1549
commit 1c4512bc40
3 files changed
+15 -15

No files matched your search

+4 -4
View File
@@ -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):