Fix flakey tplink test (#112135)
The test here was assuming the first slow was the one it wanted, but sometimes the other flow wins the racepull/112140/head
parent
ba9733e90b
commit
ec1400d392
|
@ -1113,7 +1113,6 @@ async def test_reauth_update_other_flows(
|
||||||
mock_config_entry: MockConfigEntry,
|
mock_config_entry: MockConfigEntry,
|
||||||
mock_discovery: AsyncMock,
|
mock_discovery: AsyncMock,
|
||||||
mock_connect: AsyncMock,
|
mock_connect: AsyncMock,
|
||||||
# mock_init,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reauth updates other reauth flows."""
|
"""Test reauth updates other reauth flows."""
|
||||||
mock_config_entry2 = MockConfigEntry(
|
mock_config_entry2 = MockConfigEntry(
|
||||||
|
@ -1138,10 +1137,10 @@ async def test_reauth_update_other_flows(
|
||||||
|
|
||||||
flows = hass.config_entries.flow.async_progress()
|
flows = hass.config_entries.flow.async_progress()
|
||||||
assert len(flows) == 2
|
assert len(flows) == 2
|
||||||
result = flows[0]
|
flows_by_entry_id = {flow["context"]["entry_id"]: flow for flow in flows}
|
||||||
|
result = flows_by_entry_id[mock_config_entry.entry_id]
|
||||||
assert result["step_id"] == "reauth_confirm"
|
assert result["step_id"] == "reauth_confirm"
|
||||||
assert mock_config_entry.data[CONF_DEVICE_CONFIG] == DEVICE_CONFIG_DICT_LEGACY
|
assert mock_config_entry.data[CONF_DEVICE_CONFIG] == DEVICE_CONFIG_DICT_LEGACY
|
||||||
|
|
||||||
result2 = await hass.config_entries.flow.async_configure(
|
result2 = await hass.config_entries.flow.async_configure(
|
||||||
result["flow_id"],
|
result["flow_id"],
|
||||||
user_input={
|
user_input={
|
||||||
|
|
Loading…
Reference in New Issue