def test_deserialize_general(): tsn, command_id, is_reply, args = zcl.deserialize(0, b'\x00\x01\x00') assert tsn == 1 assert command_id == 0 assert is_reply is False
def test_deserialize_cluster_command_unknown(): tsn, command_id, is_reply, args = zcl.deserialize(0, b'\x01\x01\xff') assert tsn == 1 assert command_id == 255 + 256 assert is_reply is False
def test_deserialize_cluster(): tsn, command_id, is_reply, args = zcl.deserialize(0, b'\x01\x01\x00xxx') assert tsn == 1 assert command_id == 256 assert is_reply is False
def test_deserialize_cluster_client(): tsn, command_id, is_reply, args = zcl.deserialize(3, b'\x09\x01\x00AB') assert tsn == 1 assert command_id == 256 assert is_reply is True assert args == [0x4241]
def test_deserialize_general_unknown(): tsn, command_id, is_reply, args = zcl.deserialize(0, b'\x00\x01\xff') assert tsn == 1 assert command_id == 255 assert is_reply is False