Add utf8 and binary data to msgpack test vector

This commit is contained in:
shortcutme 2019-03-16 00:53:18 +01:00
parent d7b43f4722
commit dc32556983
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -8,7 +8,7 @@ from util import StreamingMsgpack
class TestMsgpack:
test_data = {"cmd": "fileGet", "params": {"site": "1Site"}}
test_data = {"cmd": "fileGet", "params": {"site": "1Site"}, "utf8": b'\xc3\xa1rv\xc3\xadzt\xc5\xb1r\xc5\x91'.decode("utf8"), "bin": b'p\x81zDhL\xf0O\xd0\xaf', "list": [b'p\x81zDhL\xf0O\xd0\xaf', b'p\x81zDhL\xf0O\xd0\xaf']}
def testUnpackinkg(self):
assert msgpack.unpackb(msgpack.packb(self.test_data)) == self.test_data