Skip to content

test : added unit tests for build_asset_summary and related helpers#1252

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

test : added unit tests for build_asset_summary and related helpers#1252
utksh1 merged 2 commits into
utksh1:mainfrom
tmdeveloper007:#1247

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Closes #1247.

Summary of What Has Been Done:
Added unit tests for build_asset_summary and related helpers in backend/secuscan/finding_intelligence.py: _normalize_url_path, _typed_evidence, and build_asset_summary. Tests cover URL normalization, evidence item normalization with confidence clamping, and asset-level finding aggregation.

Changes Made:

  • Created testing/backend/unit/test_finding_intelligence_asset_summary.py with 21 test cases
  • _normalize_url_path: 8 tests (full URLs, relative paths, root paths, trailing slashes, empty)
  • _typed_evidence: 7 tests (dict/non-dict items, confidence clamping, override behavior)
  • build_asset_summary: 6 tests (empty inputs, findings only, services only, severity ranking, sorting)

Impact it Made:

  • Guards asset-level finding aggregation logic against regressions
  • Tests URL normalization edge cases (relative vs absolute paths)
  • 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 8751d92 into utksh1:main Jun 24, 2026
@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 build_asset_summary and related helpers

2 participants