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