Skip to content

Upgrade httpx library and switch test mocks to match_json #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Trinkes
Copy link

@Trinkes Trinkes commented May 31, 2025

Main goal: Upgrade httpx to latest supported version as I requested here #36.

Details:

  • Switched test mocks from match_content (bytes) to match_json in test_scope.py and test_sdk_primatives.py.
  • This is necessary because httpx and pytest-httpx upgrades can change JSON serialization (whitespace, key order), causing byte-level matching to fail even when the data is correct.
  • match_json is robust to formatting and key order, ensuring tests remain stable after dependency upgrades.

PS: thanks copilot for making the hard work of this PR.

Main goal: Upgrade httpx to latest supported version.

Details:
- Switched test mocks from match_content (bytes) to match_json in test_scope.py and test_sdk_primatives.py.
- This is necessary because httpx and pytest-httpx upgrades can change JSON serialization (whitespace, key order), causing byte-level matching to fail even when the data is correct.
- match_json is robust to formatting and key order, ensuring tests remain stable after dependency upgrades.
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