openlifu.io.LIFUDFU.TestSignedPackage

class openlifu.io.LIFUDFU.TestSignedPackage(methodName='runTest')[source]

Bases: TestCase

Unit tests for stm32_crc32() and parse_signed_package().

These tests are deterministic and require no hardware; they can be run by any standard Python test runner to guard against regressions that might otherwise risk bricking devices during DFU.

test_parse_signed_package_header_crc_mismatch() None[source]

Corrupt the header so header CRC verification fails.

test_parse_signed_package_payload_crc_mismatch() None[source]

Corrupt the payload so payload CRC verification fails.