def test_pack(self): packet = QuitD(data='hello world') self.assertEqual(b'\x00\x00\x00\x0C4hello world', packet.pack())
def test_quitd(self): data = 'hello world' command = QuitD(data=data) response = self._send_command(command.pack()) self.assertEqual(AckQuitD(data=data).pack(), response)