Skip to content

Feature/issue 38 unit tests#39

Merged
keraattin merged 4 commits into
developmentfrom
feature/issue-38-unit-tests
Apr 4, 2026
Merged

Feature/issue 38 unit tests#39
keraattin merged 4 commits into
developmentfrom
feature/issue-38-unit-tests

Conversation

@keraattin
Copy link
Copy Markdown
Owner

Unit tests added.

46 tests across test_headers.py, test_links.py, test_digests.py,
test_attachments.py covering all 4 analyzers plus regression
tests for Bug #25, #26, and #27.
Added 34 new tests across all 4 test files:
- Headers: lowercase key normalization, tab/newline stripping,
  multi-Received join, AbuseIPDB link, spoof check fields,
  display-name+angle-bracket From, raw values preserved on failure
- Links: sequential indexing, empty href filtering, http:// extraction,
  duplicate deduplication, http:// protocol stripping in investigation,
  URLScan domain check, QP investigation mode, no-links investigation empty
- Digests: lowercase hex validation, MD5/SHA256 direct computation match,
  independent file vs content hash paths, different files produce different hashes,
  investigation count matches data count
- Attachments: indexed from "1", count validation, SHA256/MD5 direct computation
  match, hash determinism, different attachments differ, all 3 hashes per
  attachment, investigation count matches, no-attachment investigation empty
Added 25 tests (80 → 105): minimal email handling, exact VT/AbuseIPDB/
URLScan URL format assertions, investigation key isolation, single link
extraction, query params and fragment preservation, triple-duplicate
dedup, SHA1 direct computation match for digests and attachments,
hashes verified on multiple fixtures, image attachment support,
sequential multi-attachment indexing, and exact VT URL format for
attachments. Added 4 new fixtures: minimal.eml, single_link.eml,
links_with_params.eml, image_attachment.eml.
@keraattin keraattin self-assigned this Apr 4, 2026
@keraattin keraattin added the enhancement New feature or request label Apr 4, 2026
@keraattin keraattin merged commit cede9c1 into development Apr 4, 2026
@keraattin keraattin deleted the feature/issue-38-unit-tests branch April 4, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant