"""Offline queue and serial-control regressions for the one-key DM HIL run.""" import struct import sys import types import unittest from unittest import mock import one_key_dm as hil SENDER = bytes(range(32)) TIMESTAMP = 1_791_096_123 TEXT = b"one-key DM HIL 1791096123" def contact_frame(code=7, text=TEXT, sender=SENDER, timestamp=TIMESTAMP): header = bytes([code]) + (b"\0\0\0" if code == 16 else b"") return header + sender[:6] + b"\xff\0" + struct.pack("