11 lines
299 B
Python
11 lines
299 B
Python
from twnet_parser.packer import *
|
|
|
|
def test_unpack_ints_and_strings():
|
|
u = Unpacker(b'\x01\x02\x03\x01foo\x00bar\x00')
|
|
assert u.get_int() == 1
|
|
assert u.get_int() == 2
|
|
assert u.get_int() == 3
|
|
assert u.get_int() == 1
|
|
assert u.get_str() == 'foo'
|
|
assert u.get_str() == 'bar'
|