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 race
pull/112140/head
J. Nick Koston 2024-03-03 10:29:45 -10:00 committed by GitHub
parent ba9733e90b
commit ec1400d392
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -1113,7 +1113,6 @@ async def test_reauth_update_other_flows(
mock_config_entry: MockConfigEntry,
mock_discovery: AsyncMock,
mock_connect: AsyncMock,
# mock_init,
) -> None:
"""Test reauth updates other reauth flows."""
mock_config_entry2 = MockConfigEntry(
@ -1138,10 +1137,10 @@ async def test_reauth_update_other_flows(
flows = hass.config_entries.flow.async_progress()
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 mock_config_entry.data[CONF_DEVICE_CONFIG] == DEVICE_CONFIG_DICT_LEGACY
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
user_input={