Skip to content

Commit 4c41232

Browse files
committed
chore: update tests
1 parent baf5e83 commit 4c41232

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

tests/devices/test_local_channel.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,6 @@ async def test_successful_command_response(local_channel: LocalChannel, mock_loo
147147
assert decoded_sent == TEST_REQUEST
148148

149149

150-
async def test_message_decode_error(local_channel: LocalChannel, caplog: pytest.LogCaptureFixture) -> None:
151-
"""Test handling of message decode errors."""
152-
local_channel._data_received(b"invalid_payload")
153-
await asyncio.sleep(0.01) # yield
154-
155-
warning_records = [record for record in caplog.records if record.levelname == "WARNING"]
156-
assert len(warning_records) == 1
157-
assert "Failed to decode message" in warning_records[0].message
158-
159-
160150
async def test_subscribe_callback(
161151
local_channel: LocalChannel, received_messages: list[RoborockMessage], mock_loop: Mock
162152
) -> None:

tests/devices/test_mqtt_channel.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,7 @@ async def test_message_decode_error(
158158
mqtt_message_handler(b"invalid_payload")
159159
await asyncio.sleep(0.01) # yield
160160

161-
warning_records = [record for record in caplog.records if record.levelname == "WARNING"]
162-
assert len(warning_records) == 1
163-
assert "Failed to decode message" in warning_records[0].message
161+
assert callback.call_count == 0
164162
unsub()
165163

166164

0 commit comments

Comments
 (0)