mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 19:57:03 -04:00
Fix flaky cookidoo config flow tests (#186070)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
36ec122dcf
commit
dfafd830cf
@@ -146,6 +146,7 @@ async def test_flow_reauth_drops_tokens_of_a_failed_attempt(
|
||||
)
|
||||
|
||||
assert result["reason"] == "reauth_successful"
|
||||
await hass.async_block_till_done()
|
||||
assert cookidoo_config_entry.data[CONF_TOKEN] == {}
|
||||
|
||||
|
||||
@@ -317,6 +318,7 @@ async def test_flow_reconfigure_success(
|
||||
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
assert result["reason"] == "reconfigure_successful"
|
||||
await hass.async_block_till_done()
|
||||
assert cookidoo_config_entry.data == {
|
||||
**MOCK_DATA_USER_STEP,
|
||||
CONF_EMAIL: "new-email",
|
||||
@@ -381,6 +383,7 @@ async def test_flow_reconfigure_init_data_unknown_error_and_recover_on_step_1(
|
||||
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
assert result["reason"] == "reconfigure_successful"
|
||||
await hass.async_block_till_done()
|
||||
assert cookidoo_config_entry.data == {
|
||||
**MOCK_DATA_USER_STEP,
|
||||
CONF_COUNTRY: "DE",
|
||||
@@ -443,6 +446,7 @@ async def test_flow_reconfigure_init_data_unknown_error_and_recover_on_step_2(
|
||||
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
assert result["reason"] == "reconfigure_successful"
|
||||
await hass.async_block_till_done()
|
||||
assert cookidoo_config_entry.data == {
|
||||
**MOCK_DATA_USER_STEP,
|
||||
CONF_COUNTRY: "DE",
|
||||
@@ -501,6 +505,7 @@ async def test_flow_reauth(
|
||||
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
assert result["reason"] == "reauth_successful"
|
||||
await hass.async_block_till_done()
|
||||
assert cookidoo_config_entry.data == {
|
||||
CONF_EMAIL: "new-email",
|
||||
CONF_PASSWORD: "new-password",
|
||||
@@ -554,6 +559,7 @@ async def test_flow_reauth_error_and_recover(
|
||||
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
assert result["reason"] == "reauth_successful"
|
||||
await hass.async_block_till_done()
|
||||
assert cookidoo_config_entry.data == {
|
||||
CONF_EMAIL: "new-email",
|
||||
CONF_PASSWORD: "new-password",
|
||||
|
||||
Reference in New Issue
Block a user