def testChat(self): text = "Hi there !" buff = Buffer() buff.buff = buff.pack_chat(text) self.assertTrue(text == buff.unpack_chat())
def test_pack_chat(): assert Buffer.pack_chat("spam") == b'\x10{"text": "spam"}'
def testChat(self): text = "Hi there !" buff = Buffer() buff.buff = buff.pack_chat(text) self.assertTrue(text == buff.unpack_chat())