Skip to content

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

Draft
OMpawar-21 wants to merge 1 commit into
developmentfrom
enhc/DX-8751
Draft

feat: add asset scanning unit tests for _asset_scan_status param and api_version header#167
OMpawar-21 wants to merge 1 commit into
developmentfrom
enhc/DX-8751

Conversation

@OMpawar-21

Copy link
Copy Markdown
Contributor

Summary

  • Add 9 unit tests to AssetsUnitTests covering the asset scanning feature
  • Tests validate _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

Test Validates
test_fetch_includes_scan_status_param _asset_scan_status=True appears in URL when param is set
test_find_includes_scan_status_param Same for find()
test_upload_includes_scan_status_param Same for upload()
test_fetch_without_scan_status_param_field_absent Param absent from URL when not set
test_find_without_scan_status_param_field_absent Same for find()
test_upload_without_scan_status_param_field_absent Same for upload()
test_scan_status_param_coexists_with_other_params locale and _asset_scan_status both appear in URL
test_publish_includes_api_version_header api_version: 3.2 header sent when explicitly added
test_api_version_header_scoped_to_publish api_version header absent when not added

Test Run

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

@OMpawar-21 OMpawar-21 requested a review from reeshika-h June 25, 2026 09:06
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

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

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 1 25 ✅ Passed
🟡 Medium Severity 0 3 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

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

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 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-21 OMpawar-21 changed the title feat(assets): add asset scanning unit tests for _asset_scan_status param and api_version header feat: add asset scanning unit tests for _asset_scan_status param and api_version header Jun 25, 2026
Sign up for free to 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.

1 participant