Skip to content

Support HTTPX proxy url pattern format #110

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

Merged
merged 1 commit into from
Nov 16, 2020
Merged

Conversation

lundberg
Copy link
Owner

Adds extended support for proxy url format to url pattern.

respx.get("all://example.org/foobar/")
respx.get("https://*example.org/foobar/")
respx.get("https://*.example.org/foobar/")

@codecov-io
Copy link

codecov-io commented Nov 16, 2020

Codecov Report

Merging #110 (a07199c) into master (5efd451) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #110   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        16           
  Lines         2083      2101   +18     
  Branches       147       150    +3     
=========================================
+ Hits          2083      2101   +18     
Impacted Files Coverage Δ
tests/test_router.py 100.00% <ø> (ø)
respx/patterns.py 100.00% <100.00%> (ø)
tests/test_patterns.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5efd451...a07199c. Read the comment docs.

@lundberg lundberg merged commit 2fba467 into master Nov 16, 2020
@lundberg lundberg deleted the proxy-url-pattern branch November 16, 2020 18:19
lundberg added a commit that referenced this pull request Nov 16, 2020
Added
- Extended `url` pattern with support for `HTTPX` proxy url format. (PR #110)
- Extended `host` pattern with support for regex lookup. (PR #110)
- Added `respx.request(...)`. (PR #111)

Changed
- Deprecated old `MockTransport` in favour of `respx.mock(...)`. (PR #109)
- Wrapping actual `MockTransport` in `MockRouter`, instead of extending. (PR #109)
- Extracted a `HTTPXMock`, for transport patching, from `MockRouter`. (PR #109)
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.

None yet

2 participants