Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHjelmare committed Sep 10, 2024
1 parent 8cdc0ba commit 3cfa0aa
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions test/model/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
UnwriteableValue,
)
from zwave_js_server.model import endpoint as endpoint_pkg, node as node_pkg
from zwave_js_server.model.node import Node
from zwave_js_server.model.node.firmware import (
NodeFirmwareUpdateInfo,
NodeFirmwareUpdateStatus,
Expand Down Expand Up @@ -207,14 +208,16 @@ async def test_highest_security_value(lock_schlage_be469, ring_keypad):
assert ring_keypad.highest_security_class is None


async def test_command_classes(endpoints_with_command_classes):
async def test_command_classes(endpoints_with_command_classes: Node) -> None:
"""Test command_classes property on endpoint."""
assert len(endpoints_with_command_classes.endpoints[0].command_classes) == 17
assert endpoints_with_command_classes.endpoints[0].command_classes[0].id == 38
assert (
endpoints_with_command_classes.endpoints[0].command_classes[0].command_class
== CommandClass.SWITCH_MULTILEVEL
)
node = endpoints_with_command_classes
assert len(node.endpoints[0].command_classes) == 17
command_class_info = node.endpoints[0].command_classes[0]
assert command_class_info.id == 38
assert command_class_info.command_class == CommandClass.SWITCH_MULTILEVEL
assert command_class_info.name == "Multilevel Switch"
assert command_class_info.version == 2
assert command_class_info.is_secure is False


async def test_device_config(
Expand Down

0 comments on commit 3cfa0aa

Please sign in to comment.