Use single_instance_allowed for webhook config flows (#40965)
This commit is contained in:
1 parent
17c6838b7f
commit
c7ebfdb403
23 files changed
+27
-25
No files matched your search
@@ -83,4 +83,4 @@ async def test_integration_already_configured(hass):
|
||||
)
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "one_instance_allowed"
|
||||
assert result["reason"] == "single_instance_allowed"
|
||||
@@ -111,12 +111,12 @@ async def test_abort_if_already_setup(hass):
|
||||
# Should fail, already setup (import)
|
||||
result = await flow.async_step_import({})
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "one_instance_allowed"
|
||||
assert result["reason"] == "single_instance_allowed"
|
||||
|
||||
# Should fail, already setup (flow)
|
||||
result = await flow.async_step_user({})
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "one_instance_allowed"
|
||||
assert result["reason"] == "single_instance_allowed"
|
||||
|
||||
|
||||
async def test_user_not_supports_encryption(hass, not_supports_encryption):
|
||||
|
||||
@@ -51,4 +51,4 @@ async def test_one_instance_allowed(hass):
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
assert result["type"] == "abort"
|
||||
assert result["reason"] == "one_instance_allowed"
|
||||
assert result["reason"] == "single_instance_allowed"
|
||||
@@ -135,4 +135,4 @@ async def test_integration_already_configured(hass):
|
||||
speedtestdotnet.DOMAIN, context={"source": "user"}
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "one_instance_allowed"
|
||||
assert result["reason"] == "single_instance_allowed"
|
||||
@@ -238,7 +238,7 @@ async def test_webhook_single_entry_allowed(hass, webhook_flow_conf):
|
||||
result = await flow.async_step_user()
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "one_instance_allowed"
|
||||
assert result["reason"] == "single_instance_allowed"
|
||||
|
||||
|
||||
async def test_webhook_multiple_entries_allowed(hass, webhook_flow_conf):
|
||||
|
||||
Reference in new issue
Block a user