def test_response_8060(self): msg_data = b'\x01\x01\x00\x04\x004\x10' r = responses.R8060(msg_data, 255) self.assertDictEqual( r.cleaned_data(), OrderedDict([('sequence', 1), ('endpoint', 1), ('cluster', 4), ('status', 0), ('group', '3410'), ('lqi', 255)]))
def test_response_8060_30f(self): msg_data = unhexlify(b'0a03000400932d1234') r = responses.R8060(msg_data, 255) self.assertDictEqual( r.cleaned_data(), OrderedDict([('sequence', 10), ('endpoint', 3), ('cluster', 4), ('status', 0), ('group', '932d'), ('addr', '1234'), ('lqi', 255)]))
def test_response_8060_30f(self): msg_data = b'A\x03\x00\x04\x93-\x00\x124' r = responses.R8060(msg_data, 255) self.assertDictEqual( r.cleaned_data(), OrderedDict([('sequence', 65), ('endpoint', 3), ('cluster', 4), ('addr', '932d'), ('status', 0), ('group', '1234'), ('rssi', 255)]))