Skip to content

test(uploads): mocked error-path coverage for delete_upload#202

Merged
deveaud-m merged 1 commit into
fossology:mainfrom
Valyrian-Code:test/uploads-delete-error
Jul 10, 2026
Merged

test(uploads): mocked error-path coverage for delete_upload#202
deveaud-m merged 1 commit into
fossology:mainfrom
Valyrian-Code:test/uploads-delete-error

Conversation

@Valyrian-Code

Copy link
Copy Markdown
Contributor

Refs #200.

Continuing the test-suite alignment, one module at a time. delete_upload had no mocked error test, unlike the other upload endpoints. This adds mocked tests for both of its error branches:

  • test_delete_upload_unauthorized (403 -> AuthorizationError)
  • test_delete_upload_error (500 -> FossologyApiError)

Verified against a live Fossology 4.4.0 container; ruff and mypy pass.

Refs fossology#200.

delete_upload had no mocked error test, unlike the other upload endpoints.
Adds mocked 403 (AuthorizationError) and 500 (FossologyApiError) tests so its
error-path coverage is consistent with the rest of the module.

Signed-off-by: RAJVEER42 <irajveer.bishnoi2310@gmail.com>
Copilot AI review requested due to automatic review settings July 8, 2026 08:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@deveaud-m deveaud-m merged commit 83433e7 into fossology:main Jul 10, 2026
3 checks passed
@Valyrian-Code Valyrian-Code deleted the test/uploads-delete-error branch July 10, 2026 16:03
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.

3 participants