fix!: set packet version to 0.7 by default
no more unknown version that could break things
This commit is contained in:
parent
aef93ce88b
commit
59d0150ed2
|
@ -14,10 +14,8 @@ def test_pack_handmade_count_connless7() -> None:
|
|||
|
||||
packet2 = parse7(data)
|
||||
|
||||
# TODO: this should not fail ideally
|
||||
# the version fiels is set to unknown for one of them
|
||||
# other fields probably also missmatch
|
||||
# assert vars(packet) == vars(packet2)
|
||||
assert packet.version == packet2.version
|
||||
assert vars(packet.messages[0]) == vars(packet2.messages[0])
|
||||
|
||||
assert len(packet2.messages) == 1
|
||||
assert packet2.messages[0].message_name == 'connless.count'
|
||||
|
|
|
@ -192,8 +192,8 @@ class PacketHeader(PrettyPrint):
|
|||
]) + self.token
|
||||
|
||||
class TwPacket(PrettyPrint):
|
||||
def __init__(self) -> None:
|
||||
self.version: str = 'unknown'
|
||||
def __init__(self, version: str = '0.7') -> None:
|
||||
self.version: str = version
|
||||
self.payload_raw: bytes = b''
|
||||
self.payload_decompressed: bytes = b''
|
||||
self.header: Union[PacketHeader, PacketHeader6] = PacketHeader()
|
||||
|
|
Loading…
Reference in a new issue