mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-11-01 10:12:03 +00:00
tests: Fix ADVERT_PATH packet fixture
- Use packet type 0x16 and include the four-byte timestamp so the fixture exercises ADVERT_PATH parsing instead of PRIVATE_KEY handling. - Preserve the embedded zero byte and existing path assertions.
This commit is contained in:
@@ -286,10 +286,10 @@ async def test_advert_path_preserves_embedded_zero_bytes():
|
||||
dispatcher = _CapturingDispatcher()
|
||||
reader = MessageReader(dispatcher)
|
||||
|
||||
# ADVERT_PATH (0x0e), 2 hops, 3-byte hashes.
|
||||
# ADVERT_PATH (0x16), timestamp 1, 2 hops, 3-byte hashes.
|
||||
# path_len byte: hash mode 2 (3 bytes) + 2 hops = 0x82.
|
||||
# The first hash deliberately contains an embedded 0x00 byte.
|
||||
packet = bytearray.fromhex("0e8212003456789a")
|
||||
packet = bytearray.fromhex("16010000008212003456789a")
|
||||
|
||||
await reader.handle_rx(packet)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user