1 from flasher.flasher import calc_sum, unpack_pkt
5 assert calc_sum(0x12, ['0x00']) == (0, 0x2, 0xEC)
6 assert calc_sum(0x34, ['0x00']) == (0, 0x2, 0xCA)
7 assert calc_sum(0x00, ['0x00']) == (0, 0x02, 0xFE)
10 assert unpack_pkt(b'\x81\x00\x02\x00\x00\xFE\x03') == ['0x00']
11 assert unpack_pkt(b'\x81\x00\x02\x12\x00\xEC\x03') == ['0x00']
12 assert unpack_pkt(b'\x81\x00\x02\x13\x00\xEB\x03') == ['0x00']