Skip to content

Commit

Permalink
Fix login error test per previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pnbruckner committed May 20, 2024
1 parent ed42c71 commit 5197abb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from collections.abc import Iterable, Mapping, MutableMapping
from dataclasses import dataclass
from functools import partial
from itertools import repeat
from itertools import chain, repeat
import re
from typing import Any, Self, cast

Expand All @@ -14,6 +14,7 @@
ATTR_REASON,
ATTRIBUTION,
DOMAIN,
MAX_LOGIN_ERROR_RETRIES,
UPDATE_INTERVAL,
)
from custom_components.life360.helpers import AccountID, ConfigOptions, MemberID
Expand Down Expand Up @@ -535,7 +536,14 @@ async def test_reload_new_member(hass: HomeAssistant, hass_storage: MutableStora
"get_circles": repeat([cir1]),
"get_circle_members": repeat([mem1]),
"get_circle_member": iter(
[mem1, LoginError(LOGIN_ERROR_MESSAGE), mem1]
chain(
repeat(mem1, 1),
repeat(
LoginError(LOGIN_ERROR_MESSAGE),
MAX_LOGIN_ERROR_RETRIES + 1,
),
repeat(mem1),
)
),
},
},
Expand Down

0 comments on commit 5197abb

Please sign in to comment.