Skip to content

Validate upload repository ID and adjust test#6

Merged
erseco merged 2 commits intomainfrom
feature/add-instructions-for-running-tests
Aug 5, 2025
Merged

Validate upload repository ID and adjust test#6
erseco merged 2 commits intomainfrom
feature/add-instructions-for-running-tests

Conversation

@erseco
Copy link
Owner

@erseco erseco commented Aug 5, 2025

Summary

  • validate that detected upload repository ID is a positive integer
  • relax detect_upload_repo test to accept any positive ID

Testing

  • make lint
  • make test-staging

https://chatgpt.com/codex/tasks/task_e_6891a06ad8ec8322a09a17985e01618b

@erseco erseco requested a review from Copilot August 5, 2025 07:20

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@erseco erseco requested a review from Copilot August 5, 2025 07:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds validation to ensure the detected upload repository ID is a positive integer and relaxes the corresponding test to accept any positive ID instead of requiring a specific value.

  • Adds validation in detect_upload_repo to check that the repository ID is positive
  • Updates the test to verify the ID is positive rather than checking for a specific value (5)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/py_moodle/draftfile.py Adds validation to ensure repository ID is positive before returning
tests/test_draftfile.py Relaxes test assertion to check for any positive integer instead of specific value

@erseco erseco merged commit 1bf91f6 into main Aug 5, 2025
6 checks passed
@erseco erseco deleted the feature/add-instructions-for-running-tests branch August 5, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants