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

Bump pytest-httpx from 0.30.0 to 0.34.0 #1985

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 18, 2024

Bumps pytest-httpx from 0.30.0 to 0.34.0.

Release notes

Sourced from pytest-httpx's releases.

0.34.0 (2024-11-18)

Added

  • is_optional parameter is now available on responses and callbacks registration. Allowing to add optional responses while keeping other responses as mandatory. Refer to documentation for more details.
  • is_reusable parameter is now available on responses and callbacks registration. Allowing to add multi-match responses while keeping other responses as single-match. Refer to documentation for more details.

Fixed

  • httpx_mock.get_request will now also propose to refine filters if more than one request is found instead of only proposing to switch to httpx_mock.get_requests.

0.33.0 (2024-10-28)

Added

  • Explicit support for python 3.13.
  • should_mock option (callable returning a boolean) is now available, defaulting to always returning True. Refer to documentation for more details.
  • Matching on the full multipart body can now be performed using match_files and match_data parameters. Refer to documentation for more details.
  • Matching on extensions (including timeout) can now be performed using match_extensions parameter. Refer to documentation for more details.

Removed

  • non_mocked_hosts option is not available anymore. Use should_mock instead as in the following sample:
    import pytest
    @​pytest.mark.httpx_mock(non_mocked_hosts=["my_local_test_host"])
    def test_previous_behavior(httpx_mock):
    ...
    @​pytest.mark.httpx_mock(should_mock=lambda request: request.url.host not in ["my_local_test_host"])
    def test_new_behavior(httpx_mock):
    ...
    Please note that your hosts might need to be prefixed with www. depending on your usage.

0.32.0 (2024-09-27)

Added

  • The following option is now available:
    • can_send_already_matched_responses (boolean), defaulting to False.
  • Assertion failure message in case of unmatched responses is now linking documentation on how to deactivate the check.
  • Assertion failure message in case of unmatched requests is now linking documentation on how to deactivate the check.
  • httpx.TimeoutException message issued in case of unmatched request is now linking documentation on how to reuse responses (in case some responses are already matched).

Fixed

  • Documentation now clearly state the risks associated with changing the default options.
  • Assertion failure message in case of unmatched requests at teardown is now describing requests in a more user-friendly way.
  • Assertion failure message in case of unmatched requests at teardown is now prefixing requests with - to highlight the fact that this is a list, preventing misapprehension in case only one element exists.
  • Assertion failure message in case of unmatched responses at teardown is now prefixing responses with - to highlight the fact that this is a list, preventing misapprehension in case only one element exists.
  • httpx.TimeoutException message issued in case of unmatched request is now prefixing available responses with - to highlight the fact that this is a list, preventing misapprehension in case only one element exists.
  • httpx.TimeoutException message issued in case of unmatched request is now listing unmatched responses (in registration order) before already matched one (still in registration order).
    • The incentive behind this change is to help identify a potential mismatch faster as the first unmatched response is the most likely to be the one expected to match.
  • Response description in failure messages (httpx.TimeoutException message issued in case of unmatched request or assertion failure message in case of unmatched responses at teardown) is now displaying if the response was already matched or not and less misleading in it's phrasing about what it can match (a single request by default).

Changed

  • Last registered matching response will not be reused by default anymore in case all matching responses have already been sent.

... (truncated)

Changelog

Sourced from pytest-httpx's changelog.

[0.34.0] - 2024-11-18

Added

  • is_optional parameter is now available on responses and callbacks registration. Allowing to add optional responses while keeping other responses as mandatory. Refer to documentation for more details.
  • is_reusable parameter is now available on responses and callbacks registration. Allowing to add multi-match responses while keeping other responses as single-match. Refer to documentation for more details.

Fixed

  • httpx_mock.get_request will now also propose to refine filters if more than one request is found instead of only proposing to switch to httpx_mock.get_requests.

[0.33.0] - 2024-10-28

Added

  • Explicit support for python 3.13.
  • should_mock option (callable returning a boolean) is now available, defaulting to always returning True. Refer to documentation for more details.
  • Matching on the full multipart body can now be performed using match_files and match_data parameters. Refer to documentation for more details.
  • Matching on extensions (including timeout) can now be performed using match_extensions parameter. Refer to documentation for more details.

Removed

  • non_mocked_hosts option is not available anymore. Use should_mock instead as in the following sample:
    import pytest
    @​pytest.mark.httpx_mock(non_mocked_hosts=["my_local_test_host"])
    def test_previous_behavior(httpx_mock):
    ...
    @​pytest.mark.httpx_mock(should_mock=lambda request: request.url.host not in ["my_local_test_host"])
    def test_new_behavior(httpx_mock):
    ...
    Please note that your hosts might need to be prefixed with www. depending on your usage.

[0.32.0] - 2024-09-27

Added

  • The following option is now available:
    • can_send_already_matched_responses (boolean), defaulting to False.
  • Assertion failure message in case of unmatched responses is now linking documentation on how to deactivate the check.
  • Assertion failure message in case of unmatched requests is now linking documentation on how to deactivate the check.
  • httpx.TimeoutException message issued in case of unmatched request is now linking documentation on how to reuse responses (in case some responses are already matched).

Fixed

  • Documentation now clearly state the risks associated with changing the default options.
  • Assertion failure message in case of unmatched requests at teardown is now describing requests in a more user-friendly way.
  • Assertion failure message in case of unmatched requests at teardown is now prefixing requests with - to highlight the fact that this is a list, preventing misapprehension in case only one element exists.
  • Assertion failure message in case of unmatched responses at teardown is now prefixing responses with - to highlight the fact that this is a list, preventing misapprehension in case only one element exists.
  • httpx.TimeoutException message issued in case of unmatched request is now prefixing available responses with - to highlight the fact that this is a list, preventing misapprehension in case only one element exists.
  • httpx.TimeoutException message issued in case of unmatched request is now listing unmatched responses (in registration order) before already matched one (still in registration order).
    • The incentive behind this change is to help identify a potential mismatch faster as the first unmatched response is the most likely to be the one expected to match.
  • Response description in failure messages (httpx.TimeoutException message issued in case of unmatched request or assertion failure message in case of unmatched responses at teardown) is now displaying if the response was already matched or not and less misleading in it's phrasing about what it can match (a single request by default).

Changed

  • Last registered matching response will not be reused by default anymore in case all matching responses have already been sent.

... (truncated)

Commits
  • c91c327 Merge pull request #172 from Colin-b/develop
  • 19195f5 Merge pull request #171 from Colin-b/release_new_version
  • 1f5125b Release 0.34.0
  • 30f361b Merge pull request #170 from Colin-b/update_tests
  • 88e2ff3 Merge remote-tracking branch 'origin/master' into update_tests
  • f5e5de7 Introduce is_optional and is_reusable parameters
  • 7b70d28 Better error message for get_request failure
  • f560e40 Merge pull request #169 from Colin-b/allow_to_register_multi_responses
  • ceb09f0 Allow multi match per response
  • 066b4d2 Merge pull request #168 from Colin-b/allow_to_register_optional_responses
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Nov 18, 2024
@dependabot dependabot bot force-pushed the dependabot/pip/dev/pytest-httpx-0.34.0 branch from d7cebab to 4900d7c Compare November 18, 2024 22:32
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93%. Comparing base (1928939) to head (4900d7c).

Additional details and impacted files
@@          Coverage Diff          @@
##             dev   #1985   +/-   ##
=====================================
- Coverage     93%     93%   -0%     
=====================================
  Files        368     368           
  Lines      28125   28124    -1     
=====================================
- Hits       25915   25901   -14     
- Misses      2210    2223   +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Bumps [pytest-httpx](https://github.com/Colin-b/pytest_httpx) from 0.30.0 to 0.34.0.
- [Release notes](https://github.com/Colin-b/pytest_httpx/releases)
- [Changelog](https://github.com/Colin-b/pytest_httpx/blob/develop/CHANGELOG.md)
- [Commits](Colin-b/pytest_httpx@v0.30.0...v0.34.0)

---
updated-dependencies:
- dependency-name: pytest-httpx
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/pip/dev/pytest-httpx-0.34.0 branch from 4900d7c to cede3c6 Compare November 19, 2024 00:58
@TheTechromancer TheTechromancer merged commit e15ff50 into dev Nov 19, 2024
14 checks passed
@dependabot dependabot bot deleted the dependabot/pip/dev/pytest-httpx-0.34.0 branch November 19, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant