def authentication_serial(self): self._send_command(AuthenticateCommand( AuthenticateCommand.Request.SERIAL, self._serial_number)) response = self._get_command() return (response.get_serial(), response.get_data_string())
def test_serial(self): command = AuthenticateCommand( AuthenticateCommand.Request.SERIAL, 123456789) self.assertEqual(command.get(), array.array('B', [0x44, 0x04, 0x01, 0x00, 0x15, 0xcd, 0x5b, 0x7]))