Fix tractive flaky test (#57026)
This commit is contained in:
parent
378cfab501
commit
255ffe801b
1 changed files with 5 additions and 1 deletions
|
@ -121,7 +121,10 @@ async def test_reauthentication(hass):
|
||||||
assert result["errors"] == {}
|
assert result["errors"] == {}
|
||||||
assert result["step_id"] == "reauth_confirm"
|
assert result["step_id"] == "reauth_confirm"
|
||||||
|
|
||||||
with patch("aiotractive.api.API.user_id", return_value="USERID"):
|
with patch("aiotractive.api.API.user_id", return_value="USERID"), patch(
|
||||||
|
"homeassistant.components.tractive.async_setup_entry",
|
||||||
|
return_value=True,
|
||||||
|
) as mock_setup_entry:
|
||||||
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,
|
||||||
|
@ -130,6 +133,7 @@ async def test_reauthentication(hass):
|
||||||
|
|
||||||
assert result2["type"] == "abort"
|
assert result2["type"] == "abort"
|
||||||
assert result2["reason"] == "reauth_successful"
|
assert result2["reason"] == "reauth_successful"
|
||||||
|
assert len(mock_setup_entry.mock_calls) == 1
|
||||||
|
|
||||||
|
|
||||||
async def test_reauthentication_failure(hass):
|
async def test_reauthentication_failure(hass):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue