Skip to content

fix(tests): update proxy env var test assertions for httpx 0.28#42

Open
mattcarrollcode wants to merge 1 commit intometa-llama:mainfrom
mattcarrollcode:fix/proxy-test-assertions
Open

fix(tests): update proxy env var test assertions for httpx 0.28#42
mattcarrollcode wants to merge 1 commit intometa-llama:mainfrom
mattcarrollcode:fix/proxy-test-assertions

Conversation

@mattcarrollcode
Copy link
Copy Markdown

Summary

  • Updates test_proxy_environment_variables in both sync and async client test classes
  • httpx 0.28 includes default fallback mounts (None transports) alongside configured proxy transports in _mounts, so the old assertion len(mounts) == 1 fails
  • Now filters for non-None transports and asserts the https:// proxy pattern exists instead of checking exact count

Test plan

  • pytest tests/test_client.py -k test_proxy_environment_variables — both tests pass
  • Full test suite: 528 passed, 0 failed

httpx 0.28 includes default fallback mounts (None transports) in
_mounts, so filtering for non-None transports and checking the
proxy pattern exists is more robust than asserting exact mount count.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant