- Cover the new utilities helpers (unpad, crc32, checksumPid type preservation, pidFromSerial, safe_join) and drop the now-redundant per-module crc32 tests. - Rename test_unpad_removes_pkcs7_padding to reflect that unpad only trusts the trailing pad-length byte rather than validating PKCS#7. - Replace the KOBO_HASH_KEYS change-detector with a test that documents the intentional value pin and checks the ASCII-salt contract. - Note kgenpids' hybrid import in the test-loader docstring. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
10 lines
215 B
Python
10 lines
215 B
Python
"""Tests for ineptepub helpers."""
|
|
|
|
import dedrm_test_utils as U
|
|
|
|
epub = U.load("ineptepub", package="dedrm")
|
|
|
|
|
|
def test_unpad_strips_trailing_pad_length():
|
|
assert epub.unpad(b"data\x04\x04\x04\x04") == b"data"
|