Releases: Colin-b/pytest_httpx
Releases · Colin-b/pytest_httpx
0.21.0 (2022-05-24)
0.20.0 (2022-02-05)
Added
- Add support for
pytest
==7.* (pytest
==6.* is still supported for now). (many thanks toCraig Blaszczyk
)
0.19.0 (2022-01-26)
0.18.0 (2022-01-17)
Fixed
- Callback are now executed as expected when there is a matching already sent response.
Changed
- Registration order is now looking at responses and callbacks. Prior to this version, registration order was looking at responses before callbacks.
Removed
httpx_mock.add_response
data
,files
andboundary
parameters have been removed. It was deprecated since0.17.0
. Refer to this version changelog entry for more details on how to update your code.
0.17.3 (2021-12-27)
Fixed
- A callback can now raise an exception again (regression in mypy check since [0.16.0]).
Added
- An exception can now be raised without creating a callback by using
httpx_mock.add_exception
method.
0.17.2 (2021-12-23)
Fixed
- Do not consider a callback response as read, even if it is not a stream, before returning to
httpx
. Allowing any specific httpx handling to be triggered such ashttpx.Response.elapsed
computing.
0.17.1 (2021-12-20)
Fixed
- Do not consider a response as read, even if it is not a stream, before returning to
httpx
. Allowing any specific httpx handling to be triggered such ashttpx.Response.elapsed
computing.
0.17.0 (2021-12-20)
Changed
httpx_mock.add_response
data
parameter is only used for multipart content. It was deprecated since0.14.0
. Refer to this version changelog entry for more details on how to update your code.
Removed
pytest_httpx.to_response
function has been removed. It was deprecated since0.14.0
. Refer to this version changelog entry for more details on how to update your code.
Deprecated
httpx_mock.add_response
data
,files
andboundary
parameters that were only used for multipart content. Instead, provide thestream
parameter with an instance of thehttpx._multipart.MultipartStream
.
Fixed
- Responses are no more read or closed when returned to the client. Allowing to add a response once and reading it as a new response on every request.
0.16.0 (2021-12-20)
Changed
- Callbacks are now expected to have a single parameter, the request. The previously second parameter
extensions
, can still be accessed viarequest.extensions
.
Fixed
- Allow for users to run
mypy --strict
.
0.15.0 (2021-11-16)
Changed
- Requires
httpx
==0.21.*