FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix gallery upload tests broken by Session/HTTPError changes by mKowalski256 · Pull Request #59 · rspace-os/rspace-client-python · GitHub

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

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

fix looks good 👍 .

mKowalski256 merged commit fabd133 into main Aug 24, 2026
7 of 8 checks passed
mKowalski256 deleted the fix-tests-for-2-7-3 branch August 24, 2026 14:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL