Skip to content
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

Update responses to 0.20.0 #102

Closed
wants to merge 1 commit into from

Conversation

pyup-bot
Copy link
Collaborator

This PR updates responses from 0.18.0 to 0.20.0.

Changelog

0.20.0

------

* Deprecate `responses.assert_all_requests_are_fired`, `responses.passthru_prefixes`, `responses.target`
since they are not actual properties of the class instance.
Use `responses.mock.assert_all_requests_are_fired`,
`responses.mock.passthru_prefixes`, `responses.mock.target` instead.
* Fixed the issue when `reset()` method was called in not stopped mock. See 511

0.19.0

------

* Added a registry that provides more strict ordering based on the invocation index.
See `responses.registries.OrderedRegistry`.
* Added shortcuts for each request method: delete, get, head, options, patch, post, put.
For example, to add response for POST request you can use `responses.post()` instead
of `responses.add(responses.POST)`.
* Prevent `responses.activate` decorator to leak, if wrapped function called from within another
wrapped function. Also, allow calling of above mentioned chain. See 481 for more details.
* Expose `get_registry()` method of `RequestsMock` object. Replaces internal `_get_registry()`.
* `query_param_matcher` can now accept dictionaries with `int` and `float` values.
* Add support for the `loose` version of `query_param_matcher` via named argument `strict_match`.
* Added support for `async/await` functions.
* `response_callback` is no longer executed on exceptions raised by failed `Response`s
* Change logic of `_get_url_and_path` to comply with RFC 3986. Now URL match occurs by matching
schema, authority and path, where path is terminated by the first question mark ("?") or
number sign ("") character, or by the end of the URI.
* An error is now raised when both `content_type` and `headers[content-type]` are provided as parameters.
* When a request isn't matched the passthru prefixes are now included in error messages.
Links

@pyup-bot pyup-bot temporarily deployed to test March 18, 2022 09:08 Inactive
@pyup-bot pyup-bot temporarily deployed to test March 18, 2022 09:08 Inactive
@pyup-bot pyup-bot temporarily deployed to test March 18, 2022 09:08 Inactive
@pyup-bot pyup-bot temporarily deployed to test March 18, 2022 09:08 Inactive
@mitchos mitchos closed this in f87e1cc Apr 14, 2022
@mitchos mitchos deleted the pyup-update-responses-0.18.0-to-0.20.0 branch May 1, 2022 22:44
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.

1 participant