Skip to content

⬆️ Update dependency pytest-httpx to v0.36.2 - #14

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/pytest-httpx-0.x-lockfile
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/pytest-httpx-0.x-lockfile

Conversation

@renovate

@renovate renovate Bot commented Nov 14, 2023

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
pytest-httpx (changelog) 0.26.00.36.2 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

Colin-b/pytest_httpx (pytest-httpx)

v0.36.2

Compare Source

Fixed
  • Document how to ignore query parameters while matching on URL.

v0.36.0

Compare Source

Changed
  • pytest required version is now 9.
Added
  • Explicit support for python 3.14.
  • match_params parameter is now available on responses and callbacks registration, as well as request(s) retrieval. Allowing to provide query parameters as a dict instead of being part of the matched URL.
    • This parameter allows to perform partial query params matching (refer to documentation for more information).
Fixed
  • URL with more than one value for the same parameter were not matched properly (matching was performed on the first value).
  • httpx_mock.add_exception is now properly documented (accepts BaseException instead of Exception).
Removed
  • pytest 8 is not supported anymore.
  • python 3.9 is not supported anymore.

v0.35.0

Compare Source

Changed

v0.34.0

Compare Source

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.

v0.33.0

Compare Source

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.

v0.32.0

Compare Source

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.
    • This behavior can be changed thanks to the new pytest.mark.httpx_mock(can_send_already_matched_responses=True) option.
    • The incentive behind this change is to spot regression if a request was issued more than the expected number of times.
  • HTTPXMock class was only exposed for type hinting purpose. This is now explained in the class docstring.
    • As a result this is the last time a change to __init__ signature will be documented and considered a breaking change.
    • Future changes will not be documented and will be considered as internal refactoring not worth a version bump.
    • __init__ now expects one parameter, the newly introduced (since [0.31.0]) options.
  • HTTPXMockOptions class was never intended to be exposed and is now marked as private.

v0.31.2

Compare Source

Fixed
  • httpx_mock marker can now be defined at different levels for a single test.

v0.31.1

Compare Source

Fixed
  • It is now possible to match on content provided as async iterable by the client.

v0.31.0

Compare Source

Changed
  • Tests will now fail at teardown by default if some requests were issued but were not matched.
    • This behavior can be changed thanks to the new pytest.mark.httpx_mock(assert_all_requests_were_expected=False) option.
    • The incentive behind this change is to spot unexpected requests in case code is swallowing httpx.TimeoutException.
  • The httpx_mock fixture is now configured using a marker (many thanks to Frazer McLean).
    # Apply marker to whole module
    pytestmark = pytest.mark.httpx_mock(assert_all_responses_were_requested=False)
    
    # Or to specific tests
    @​pytest.mark.httpx_mock(non_mocked_hosts=[...])
    def test_foo(httpx_mock):
        ...
    • The following options are available:
      • assert_all_responses_were_requested (boolean), defaulting to True.
      • assert_all_requests_were_expected (boolean), defaulting to True.
      • non_mocked_hosts (iterable), defaulting to an empty list, meaning all hosts are mocked.
  • httpx_mock.reset do not expect any parameter anymore and will only reset the mock state (no assertions will be performed).
Removed
  • pytest 7 is not supported anymore (pytest 8 has been out for 9 months already).
  • assert_all_responses_were_requested fixture is not available anymore, use pytest.mark.httpx_mock(assert_all_responses_were_requested=False) instead.
  • non_mocked_hosts fixture is not available anymore, use pytest.mark.httpx_mock(non_mocked_hosts=[]) instead.

v0.30.0

Compare Source

Changed
Fixed
  • Switch from setup.py to pyproject.toml (many thanks to Felix Scherz).

v0.29.0

Compare Source

Added

v0.28.0

Compare Source

Changed

v0.27.0

Compare Source

Added
  • Explicit support for python 3.12.
Fixed
  • Custom HTTP transport are now handled (parent call to handle_async_request or handle_request).
Changed
  • Only HTTP transport are now mocked, this should not have any impact, however if it does, please feel free to open an issue describing your use case.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • "before 2am"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added dependencies Upgrade or downgrade of project dependencies. no-stale This issue or PR is exempted from the stable bot. python labels Nov 14, 2023
@codecov

codecov Bot commented Nov 14, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.62%. Comparing base (98d6ee5) to head (041d042).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #14   +/-   ##
=======================================
  Coverage   59.62%   59.62%           
=======================================
  Files           5        5           
  Lines         161      161           
  Branches       24       24           
=======================================
  Hits           96       96           
  Misses         57       57           
  Partials        8        8           

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

@renovate renovate Bot changed the title ⬆️ Update dependency pytest-httpx to v0.27.0 ⬆️ Update dependency pytest-httpx to v0.28.0 Dec 21, 2023
@renovate
renovate Bot force-pushed the renovate/pytest-httpx-0.x-lockfile branch from 8340757 to be76a15 Compare December 21, 2023 11:05
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@renovate renovate Bot changed the title ⬆️ Update dependency pytest-httpx to v0.28.0 ⬆️ Update dependency pytest-httpx to v0.29.0 Jan 29, 2024
@renovate
renovate Bot force-pushed the renovate/pytest-httpx-0.x-lockfile branch from be76a15 to 6d28135 Compare January 29, 2024 21:26
@renovate
renovate Bot force-pushed the renovate/pytest-httpx-0.x-lockfile branch from 6d28135 to ba3c8c1 Compare February 21, 2024 18:41
@renovate renovate Bot changed the title ⬆️ Update dependency pytest-httpx to v0.29.0 ⬆️ Update dependency pytest-httpx to v0.30.0 Feb 21, 2024
@renovate
renovate Bot force-pushed the renovate/pytest-httpx-0.x-lockfile branch from ba3c8c1 to 041d042 Compare February 26, 2024 04:38
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@renovate
renovate Bot force-pushed the renovate/pytest-httpx-0.x-lockfile branch from 041d042 to d61cd34 Compare September 20, 2024 12:18
@renovate renovate Bot changed the title ⬆️ Update dependency pytest-httpx to v0.30.0 ⬆️ Update dependency pytest-httpx to v0.31.0 Sep 20, 2024
@sonarqubecloud

Copy link
Copy Markdown

@renovate renovate Bot changed the title ⬆️ Update dependency pytest-httpx to v0.31.0 ⬆️ Update dependency pytest-httpx to v0.31.1 Sep 22, 2024
@renovate renovate Bot changed the title ⬆️ Update dependency pytest-httpx to v0.31.1 ⬆️ Update dependency pytest-httpx to v0.31.2 Sep 23, 2024
@renovate renovate Bot changed the title ⬆️ Update dependency pytest-httpx to v0.31.2 ⬆️ Update dependency pytest-httpx to v0.32.0 Sep 27, 2024
@renovate
renovate Bot force-pushed the renovate/pytest-httpx-0.x-lockfile branch from d61cd34 to 0fe06f8 Compare October 28, 2024 17:22
@renovate renovate Bot changed the title ⬆️ Update dependency pytest-httpx to v0.32.0 ⬆️ Update dependency pytest-httpx to v0.33.0 Oct 28, 2024
@renovate
renovate Bot force-pushed the renovate/pytest-httpx-0.x-lockfile branch from 0fe06f8 to fa3518c Compare November 18, 2024 19:49
@renovate renovate Bot changed the title ⬆️ Update dependency pytest-httpx to v0.33.0 ⬆️ Update dependency pytest-httpx to v0.34.0 Nov 18, 2024
@sonarqubecloud

Copy link
Copy Markdown

@renovate renovate Bot changed the title ⬆️ Update dependency pytest-httpx to v0.34.0 ⬆️ Update dependency pytest-httpx to v0.35.0 Nov 28, 2024
@renovate
renovate Bot force-pushed the renovate/pytest-httpx-0.x-lockfile branch from fa3518c to 8789aad Compare August 10, 2025 13:43
@renovate
renovate Bot force-pushed the renovate/pytest-httpx-0.x-lockfile branch from 8789aad to 2eda67f Compare September 8, 2025 13:11
@renovate renovate Bot changed the title ⬆️ Update dependency pytest-httpx to v0.35.0 ⬆️ Update dependency pytest-httpx to v0.36.0 Dec 2, 2025
@renovate renovate Bot changed the title ⬆️ Update dependency pytest-httpx to v0.36.0 ⬆️ Update dependency pytest-httpx to v0.36.2 Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Upgrade or downgrade of project dependencies. no-stale This issue or PR is exempted from the stable bot. python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants