Skip to content

feat: add asset scanning unit tests for _asset_scan_status param and api_version header - #167

Merged
reeshika-h merged 2 commits into
developmentfrom
enhc/DX-8751
Jul 3, 2026
Merged

feat: add asset scanning unit tests for _asset_scan_status param and api_version header#167
reeshika-h merged 2 commits into
developmentfrom
enhc/DX-8751

Conversation

@OMpawar-21

@OMpawar-21OMpawar-21 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add 9 unit tests to AssetsUnitTests covering the asset scanning feature
  • Tests validate include_asset_scan_status query param behavior on find(), fetch(), and upload()
  • Tests validate api_version header behavior on publish()
  • No changes to core SDK files — uses existing add_param() / add_header() from Parameter base class

Tests Added

TestValidates
test_fetch_includes_scan_status_paraminclude_asset_scan_status=True appears in URL when param is set
test_find_includes_scan_status_paramSame for find()
test_upload_includes_scan_status_paramSame for upload()
test_fetch_without_scan_status_param_field_absentParam absent from URL when not set
test_find_without_scan_status_param_field_absentSame for find()
test_upload_without_scan_status_param_field_absentSame for upload()
test_scan_status_param_coexists_with_other_paramslocale and _asset_scan_status both appear in URL
test_publish_includes_api_version_headerapi_version: 3.2 header sent when explicitly added
test_api_version_header_scoped_to_publishapi_version header absent when not added

Test Run

All 36 unit tests passed (PYTHONPATH=. pytest tests/unit/assets/test_assets_unit.py -v)

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0125✅ Passed
🟡 Medium Severity03500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 365 days✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 1
  • Medium without fixes: 3
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@OMpawar-21OMpawar-21 changed the title feat(assets): add asset scanning unit tests for _asset_scan_status param and api_version headerfeat: add asset scanning unit tests for _asset_scan_status param and api_version headerJun 25, 2026
reeshika-h
reeshika-h previously approved these changes Jun 26, 2026
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0125✅ Passed
🟡 Medium Severity03500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 365 days✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 1
  • Medium without fixes: 3
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@reeshika-h
reeshika-h marked this pull request as ready for review July 3, 2026 06:52
@reeshika-h
reeshika-h requested a review from a team as a code ownerJuly 3, 2026 06:52
@reeshika-h
reeshika-h merged commit 8ba9b5f into developmentJul 3, 2026
8 checks passed
@reeshika-h
reeshika-h deleted the enhc/DX-8751 branch July 3, 2026 06:52
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@OMpawar-21@reeshika-h