Skip to content

Fix gallery upload tests broken by Session/HTTPError changes - #59

Merged
mKowalski256 merged 1 commit into
mainfrom
fix-tests-for-2-7-3
Aug 24, 2026
Merged

Fix gallery upload tests broken by Session/HTTPError changes#59
mKowalski256 merged 1 commit into
mainfrom
fix-tests-for-2-7-3

Conversation

@mKowalski256

Copy link
Copy Markdown
Contributor

The v2.8.0 reliability change routed requests through a requests.Session and made _check_status catch requests.HTTPError, but the gallery upload tests still patched module-level requests.get/post and raised a bare Exception, so patches missed and mismatch handling never triggered.

Repoint patches to requests.Session.* and raise requests.HTTPError.

The v2.8.0 reliability change routed requests through a requests.Session
and made _check_status catch requests.HTTPError, but the gallery upload
tests still patched module-level requests.get/post and raised a bare
Exception, so patches missed and mismatch handling never triggered.

Repoint patches to requests.Session.* and raise requests.HTTPError.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the gallery filesystem unit tests to align with the newer ClientBase behavior that routes HTTP calls through a requests.Session and normalizes error handling via requests.HTTPError, ensuring the upload mismatch logic is exercised correctly.

Changes:

  • Update test patches from module-level requests.get/post to requests.Session.get/post so mocks intercept the actual call path.
  • Update the failed-upload mock to raise requests.HTTPError (matching _check_status behavior) instead of a bare Exception.
  • Add the requests import required by the updated mock.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@nebay-abraha nebay-abraha 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.

fix looks good 👍 .

@mKowalski256
mKowalski256 merged commit fabd133 into main Aug 24, 2026
7 of 8 checks passed
@mKowalski256
mKowalski256 deleted the fix-tests-for-2-7-3 branch August 24, 2026 14:39
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