Skip to content

Commit 958f945

Browse files
committed
chore: fix tests
1 parent a43946f commit 958f945

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

tests/devices/test_local_channel.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,12 @@ async def test_successful_command_response(local_channel: LocalChannel, mock_loo
148148
assert decoded_sent == TEST_REQUEST
149149

150150

151-
async def test_message_decode_error(local_channel: LocalChannel, caplog: pytest.LogCaptureFixture) -> None:
151+
async def test_message_decode_error(local_channel: LocalChannel, caplog: pytest.LogCaptureFixture, received_messages: list[RoborockMessage]) -> None:
152152
"""Test handling of message decode errors."""
153-
with caplog.at_level(logging.WARNING):
154-
local_channel._data_received(b"invalid_payload")
155-
await asyncio.sleep(0.01) # yield
153+
local_channel._data_received(b"invalid_payload")
154+
await asyncio.sleep(0.01) # yield
156155

157-
warning_records = caplog.records
158-
assert len(warning_records) == 1
159-
assert "Failed to decode message" in warning_records[0].message
156+
assert received_messages == []
160157

161158

162159
async def test_subscribe_callback(

0 commit comments

Comments
 (0)