Skip to content

Commit

Permalink
Fix Python tests (#49) (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu-mp authored Mar 15, 2024
1 parent 968c2ee commit 6413f0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest]
asyncio_mode = auto
8 changes: 4 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def bypass_get_info_fixture():
{"ip": "192.168.0.10", "uid": "0K040210392021030300010000", "dtype": "spa"}
)
with patch(
"intex_spa.IntexSpa.async_update_info",
"aio_intex_spa.IntexSpa.async_update_info",
return_value=info,
):
yield
Expand All @@ -67,7 +67,7 @@ def bypass_update_data_fixture():
"""Skip calls to get data from API."""
status = IntexSpaStatus(int("0xFFFF110F0107001F0000000080808021000016", 16))
with patch(
"intex_spa.IntexSpa.async_update_status",
"aio_intex_spa.IntexSpa.async_update_status",
return_value=status,
):
yield
Expand All @@ -79,7 +79,7 @@ def bypass_update_data_fixture():
def error_update_info_fixture():
"""Simulate error when retrieving data from API."""
with patch(
"intex_spa.IntexSpa.async_update_info",
"aio_intex_spa.IntexSpa.async_update_info",
side_effect=Exception,
):
yield
Expand All @@ -91,7 +91,7 @@ def error_update_info_fixture():
def error_update_data_fixture():
"""Simulate error when retrieving data from API."""
with patch(
"intex_spa.IntexSpa.async_update_status",
"aio_intex_spa.IntexSpa.async_update_status",
side_effect=Exception,
):
yield

0 comments on commit 6413f0c

Please sign in to comment.