Releases: getsentry/responses
Releases · getsentry/responses
Responses 0.25.1
What's Changed
- Use pytest.mark.asyncio by @markstory in #707
- fix mocked HEAD response when content-length header is present by @ddarricau in #712
- fix(matchers): Don't sort failed matches when printing error message by @mgaligniana in #711
New Contributors
- @ddarricau made their first contribution in #712
- @mgaligniana made their first contribution in #711
Full Changelog: 0.25.0...0.25.1
0.25.0
0.24.1
0.24.0
- Added
BaseResponse.calls
to access calls data of a separate mocked request. See #664 - Added
real_adapter_send
parameter toRequestsMock
that will allow users to set
through which function they would like to send real requests - Added support for re.Pattern based header matching.
- Added support for gzipped response bodies to
json_params_matcher
. - Fix
Content-Type
headers issue when the header was duplicated. See #644 - Moved types-pyyaml dependency to
tests_requires
- Removed Python3.7 support
0.23.3
- Allow urllib3>=1.25.10
0.23.2
This release is the last to support Python 3.7
- Updated dependency to urllib3>=2 and requests>=2.30.0. See #635
- Fixed issue when custom adapters were sending only positional args. See #642
- Expose
unbound_on_send
method inRequestsMock
class. This method returns new function
that is called byRequestsMock
instead of originalsend
method defined by any adapter.
0.23.1
0.23.0
- Add Python 3.11 support
- Fix type annotations of
CallList
. See #593 request
object is attached to any custom exception provided asResponse
body
argument. See #588- Fixed mocked responses leaking between tests when
assert_all_requests_are_fired
and a request was not fired. - [BETA] Default recorder format was changed to YAML. Added
responses.RequestsMock._parse_response_file
and
responses._recorder.Recorder.dump_to_file
methods that allow users to override default parser to eg toml, json
0.22.0
- Update
requests
dependency to the version of 2.22.0 or higher. See #584. - [BETA] Added possibility to record responses to TOML files via
@_recorder.record(file_path="out.toml")
decorator. - [BETA] Added possibility to replay responses (populate registry) from TOML files
viaresponses._add_from_file(file_path="out.toml")
method. - Fix type for the
mock
's patcher object. See #556 - Fix type annotation for
CallList
- Add
passthrough
argument toBaseResponse
object. See #557 - Fix
registries
leak. See #563 OriginalResponseShim
is removed. See #585- Add support for the
loose
version ofjson_params_matcher
via named argumentstrict_match
. See #551 - Add lists support as JSON objects in
json_params_matcher
. See #559 - Added project links to pypi listing.
delete
,get
,head
,options
,patch
,post
,put
shortcuts are now implemented usingfunctools.partialmethod
.- Fix
MaxRetryError
exception. Replace exception byRetryError
according torequests
implementation. See #572. - Adjust error message when
Retry
is exhausted. See #580.
0.21.0
- Add
threading.Lock()
to allowresponses
working withthreading
module. - Add
urllib3
Retry
mechanism. See #135 - Removed internal
_cookies_from_headers
function - Now
add
,upsert
,replace
methods return registered response.
remove
method returns list of removed responses. - Added null value support in
urlencoded_params_matcher
viaallow_blank
keyword argument - Added strict version of decorator. Now you can apply
@responses.activate(assert_all_requests_are_fired=True)
to your function to validate that all requests were executed in the wrapped function. See #183