twnet_parser/tests/packet_header6_test.py

21 lines
679 B
Python
Raw Normal View History

2023-03-16 15:43:53 +00:00
from twnet_parser.packet import *
2023-03-16 13:04:48 +00:00
# TODO: uncomment and adjust ack/size when 0.6 is done
# def test_parse_065_close():
# packet = parse7(b'\x10\x10\x00\x04\x9a\xcb\x09\xc9') # 0.6.5 close
2023-03-16 13:04:48 +00:00
#
# assert packet.version == '0.6.5'
#
# assert packet.header.ack == 10
# assert packet.header.token == b'\x9a\xcb\x09\xc9'
# assert packet.header.num_chunks == 0
#
# assert packet.header.flags.control == True
# assert packet.header.flags.resend == False
# assert packet.header.flags.compression == False
# assert packet.header.flags.connless == False
#
# assert packet.messages[0].message_name == 'close'
2023-03-16 13:04:48 +00:00
# assert len(packet.messages) == 1