Skip to content

test : added unit tests for finding_intelligence _parse_timestamp and _stable_id helpers#1254

Merged
utksh1 merged 2 commits into
utksh1:mainfrom
tmdeveloper007:#1249
Jun 24, 2026
Merged

test : added unit tests for finding_intelligence _parse_timestamp and _stable_id helpers#1254
utksh1 merged 2 commits into
utksh1:mainfrom
tmdeveloper007:#1249

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Closes #1249.

Summary of What Has Been Done:
Added unit tests for _parse_timestamp and _stable_id in backend/secuscan/finding_intelligence.py, two foundational pure helpers used throughout the finding normalization pipeline. Tests cover datetime conversion, timezone handling, invalid inputs, and stable ID determinism.

Changes Made:

  • Created testing/backend/unit/test_finding_intelligence_timestamp.py with 19 test cases
  • _parse_timestamp: 9 tests (aware/naive datetime, ISO strings with/without Z, invalid strings, empty, None, microseconds, timezone conversion)
  • _stable_id: 10 tests (prefix, determinism, different inputs, None/empty/whitespace parts, case normalization, length)

Impact it Made:

  • Guards the foundation of the finding normalization pipeline
  • Ensures stable IDs are deterministic across runs
  • Increases overall test coverage of the finding_intelligence module

Note: This task is being handled by tmdeveloper007 -- please assign to that account when picking it up.

@utksh1 utksh1 merged commit eb30d33 into utksh1:main Jun 24, 2026
8 of 9 checks passed
@utksh1 utksh1 added the gssoc:approved Admin validation: approved for GSSoC scoring label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Admin validation: approved for GSSoC scoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test : add unit tests for finding_intelligence _parse_timestamp and _stable_id helpers

2 participants