Skip to content

Commit

Permalink
chore(ed): add ed device build_query test
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwentao committed Dec 23, 2024
1 parent bd3bfcb commit 8da1d37
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions tests/devices/ed/device_ed_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@

from midealocal.const import ProtocolVersion
from midealocal.devices.ed import DeviceAttributes, MideaEDDevice
from midealocal.devices.ed.message import MessageQuery, MessageQuery01
from midealocal.devices.ed.message import (
MessageQuery,
MessageQuery01,
MessageQuery03,
MessageQuery04,
MessageQuery05,
MessageQuery06,
MessageQuery07,
MessageQueryFF,
)


class TestMideaEDDevice:
Expand Down Expand Up @@ -89,9 +98,15 @@ def test_process_message(self) -> None:
def test_build_query(self) -> None:
"""Test build query."""
queries = self.device.build_query()
assert len(queries) == 2
assert len(queries) == 8
assert isinstance(queries[0], MessageQuery)
assert isinstance(queries[1], MessageQuery01)
assert isinstance(queries[2], MessageQuery03)
assert isinstance(queries[3], MessageQuery04)
assert isinstance(queries[4], MessageQuery05)
assert isinstance(queries[5], MessageQuery06)
assert isinstance(queries[6], MessageQuery07)
assert isinstance(queries[7], MessageQueryFF)

def test_set_attribute(self) -> None:
"""Test set attribute."""
Expand Down

0 comments on commit 8da1d37

Please sign in to comment.