mirror of
https://github.com/kc1awv/rrcd.git
synced 2026-04-27 05:59:59 -07:00
12 lines
351 B
Python
12 lines
351 B
Python
from rrcd.codec import decode, encode
|
|
from rrcd.constants import T_MSG
|
|
from rrcd.envelope import make_envelope, validate_envelope
|
|
|
|
|
|
def test_codec_round_trip() -> None:
|
|
env = make_envelope(T_MSG, src=b"peer", room="#general", body="hello")
|
|
data = encode(env)
|
|
decoded = decode(data)
|
|
assert decoded == env
|
|
validate_envelope(decoded)
|