Repository navigation
test is_https_redirect via public api - #3064
Conversation
| ) | ||
|
|
||
| client = httpx.Client() | ||
| headers = client._redirect_headers(request, url, "GET") |
There was a problem hiding this comment.
Hrm. Is there a way around that allows us to test this against public API?
There was a problem hiding this comment.
Might be that we're okay with leaning on implementation details a little bit, certainly not a terrible trade-off to make. (I think we already have some instances of this in our test cases right?)
There was a problem hiding this comment.
Also, we already use private-accessors in another test:
httpx/tests/client/test_proxies.py
Lines 333 to 338 in 4f6edf3
lovelydinosaur
left a comment
There was a problem hiding this comment.
Okay thanks. We're still using private API here, but I do think it's a little neater anyways since it nearly gets us to consistent imports all the way through the tests.
* test `is_https_redirect` via public api * Update tests/test_utils.py
* test `is_https_redirect` via public api * Update tests/test_utils.py
Summary
chunk of #2851