Skip to content

Commit f603dca

Browse files
committed
Fixing test (incomplete code coverage, yet)
1 parent a4adaf1 commit f603dca

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ async def client() -> AsyncGenerator[Tado, None]:
2727
session=session,
2828
request_timeout=10,
2929
) as tado:
30+
await tado.login()
3031
yield tado
3132

3233

tests/test_tado.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,9 @@ async def response_handler(_: str, **_kwargs: Any) -> CallbackResult: # pylint:
602602
callback=response_handler,
603603
)
604604

605-
async with aiohttp.ClientSession() as session, Tado(
606-
request_timeout=0, session=session
607-
) as tado:
605+
async with aiohttp.ClientSession() as session:
606+
tado = Tado(session=session, request_timeout=0)
607+
await tado.login()
608608
with pytest.raises(TadoConnectionError):
609-
assert await tado.get_devices()
609+
await tado.get_devices()
610+
await tado.close()

0 commit comments

Comments
 (0)