You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #1297 and #1293 we're almost at the point where we can have a really nice simple httpx.MockTransport(handler=...) implementation, which I think would be worthwhile, given how useful we find it in our own tests, and how it'd help round out the usefulness of the Transport API to our users (and provide a point of demonstration around being able to use Request/Response models in that context.)
The one outstanding bit of work that we still need really is the .request+.arequest refactoring mentioned in #1274
Also worth mentioning that the following all fit together as as a nice related set of enhancements...
So it's possible that we ought to aim to release them together, just to bring some extra coherence to eg. "Here's the mount API we've just added, and here's the sort of stuff you can do with it"
The text was updated successfully, but these errors were encountered:
If I read this correctly, the current RESPXMockTransport could get rid of mock patching httpcore transports, and instead be refactored to a pattern > response handler.
Though, I still think mock.patch functionality would be of interest in RESPX to be able to mock httpcore individually, so that future libs using httpcore still can use RESPX for mocking.
Based on
httpx/tests/utils.py
Lines 27 to 75 in 8ceb34f
Usage:
Since #1297 and #1293 we're almost at the point where we can have a really nice simple
httpx.MockTransport(handler=...)
implementation, which I think would be worthwhile, given how useful we find it in our own tests, and how it'd help round out the usefulness of the Transport API to our users (and provide a point of demonstration around being able to useRequest
/Response
models in that context.)The one outstanding bit of work that we still need really is the.request
+.arequest
refactoring mentioned in #1274Also worth mentioning that the following all fit together as as a nice related set of enhancements...
httpx.HTTPTransport()
- Addhttpx.HTTPTransport()
andhttpx.AsyncHTTPTransport()
#1302httpx.MockTransport()
- This PR.So it's possible that we ought to aim to release them together, just to bring some extra coherence to eg. "Here's the mount API we've just added, and here's the sort of stuff you can do with it"
The text was updated successfully, but these errors were encountered: