Commit Graph

  • 133221a192 Accepting request 1231288 from devel:languages:python:pytest main Ana Guerrero 2024-12-16 18:17:05 +00:00
  • 494ebe2651 - Update to 0.35.0: * Requires httpx==0.28.* Steve Kowalik 2024-12-16 04:00:27 +00:00
  • 6da7e98d71 Accepting request 1226222 from devel:languages:python:pytest Ana Guerrero 2024-11-28 21:42:34 +00:00
  • 59e9dcc038 - update to 0.34.0: * 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. * 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. * 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. * 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 Dirk Mueller 2024-11-25 09:21:23 +00:00
  • 1efa044433 Accepting request 1143509 from devel:languages:python:pytest Ana Guerrero 2024-02-02 14:47:18 +00:00
  • 11d5ba95c3 - update to 0.29.0: * Add support for pytest==8.\* Dirk Mueller 2024-02-01 21:22:19 +00:00
  • 32ddec92a4 Accepting request 1137816 from devel:languages:python:pytest Ana Guerrero 2024-01-10 20:52:06 +00:00
  • 546d5472da - update to 0.28.0: * Requires httpx==0.26.\* Dirk Mueller 2024-01-09 21:39:39 +00:00
  • 8ea7ea8daf Accepting request 1127546 from devel:languages:python:pytest Ana Guerrero 2023-11-20 20:19:27 +00:00
  • 82272f6a63 - update to 0.27.0: * Explicit support for python 3.12. * Custom HTTP transport are now handled (parent call to handle_async_request or handle_request). * 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. Dirk Mueller 2023-11-19 10:51:21 +00:00
  • fac7c6a0f4 Accepting request 1124087 from devel:languages:python:pytest Ana Guerrero 2023-11-08 21:17:50 +00:00
  • 9e7dc9765d - update to 0.26.0: * Added proxy_url parameter which allows matching on proxy URL. * Requires httpx==0.25.\* * Added match_json parameter which allows matching on JSON decoded body (matching against python representation instead of bytes). * Even if it was never documented as a feature, the match_headers parameter was not considering header names case when matching. * Matching on headers does not ignore name case anymore, the name must now be cased as sent (as some servers might expect a specific case). * Add :Any type hint to **matchers function arguments to satisfy strict type checking mode in pyright. * Python 3.7 and 3.8 are no longer supported. * httpx_mock.add_response is now returning a new httpx.Response instance upon each matching request. Preventing unnecessary recursion in streams. Dirk Mueller 2023-11-07 19:45:51 +00:00
  • 2d8e85d6ac Accepting request 1096277 from devel:languages:python:pytest Dominique Leuenberger 2023-07-01 21:18:29 +00:00
  • 892500dfca Accepting request 1096262 from home:ecsos:python Markéta Machová 2023-07-01 10:35:59 +00:00
  • 0ae268323e Accepting request 1090223 from devel:languages:python:pytest Dominique Leuenberger 2023-06-01 15:19:57 +00:00
  • 6944f8431c - update to 0.22.0: * Requires httpx==0.24.\* * Update version specifiers for pytest dependency to support packaging 23. * Add explicit support for python 3.11. Dirk Mueller 2023-06-01 08:41:23 +00:00
  • 4a9b520b60 Accepting request 1058836 from devel:languages:python:pytest Dominique Leuenberger 2023-01-17 16:35:27 +00:00
  • d0564e44ed - Update to 0.21.2 * URL containing non ASCII characters in query can now be matched. * Requests are now cleared when calling httpx_mock.reset. - 0.21.1 * httpx_mock.add_callback now handles async callbacks. - Unpin httpx and pytest in python metadata Daniel Garcia 2023-01-16 16:40:54 +00:00
  • 254dbe0948 Accepting request 991207 from devel:languages:python:pytest Dominique Leuenberger 2022-08-08 08:02:31 +00:00
  • 655de68525 Accepting request 990998 from home:bnavigator:branches:devel:languages:python Matej Cepl 2022-07-26 07:50:24 +00:00
  • e10d505695 Accepting request 958541 from devel:languages:python:pytest Dominique Leuenberger 2022-03-03 23:17:13 +00:00
  • ea108f973a - Upgrade to 0.20.0: * Add support for [pytest](https://docs.pytest.org)==7.\* ([pytest](https://docs.pytest.org)==6.\* is still supported for now). (many thanks to [Craig Blaszczyk](https://github.com/jakul)) * Requires [httpx](https://www.python-httpx.org)==0.22.\* * Python 3.6 is no longer supported. * Callback are now executed as expected when there is a matching already sent response. * httpx_mock.add_response data, files and boundary parameters have been removed. It was deprecated since 0.17.0. Refer to this version changelog entry for more details on how to update your code. * An exception can now be raised without creating a callback by using httpx_mock.add_exception method. * httpx_mock.add_response data parameter is only used for multipart content. It was deprecated since 0.14.0. Refer to this version changelog entry for more details on how to update your code. * pytest_httpx.to_response function has been removed. It was deprecated since 0.14.0. Refer to this version changelog entry for more details on how to update your code. * Callbacks are now expected to have a single parameter, the request. The previously second parameter extensions, can still be accessed via request.extensions. * Callbacks are now expected to return a httpx.Response instance instead of the previous httpcore.Response tuple. As a consequence, pytest_httpx.to_response now returns a httpx.Response instance. * httpx_mock.add_response now allows to explicitly provide bytes using content parameter. * httpx_mock.add_response now allows to explicitly provide string using text parameter. * httpx_mock.add_response now allows to explicitly provide HTML string content using html parameter. * httpx_mock.add_response now allows to explicitly provide streamed content using stream parameter and the new pytest_httpx.IteratorStream class. * pytest_httpx.to_response is now deprecated in favor of httpx.Response. This function will be removed in a future release. * httpx_mock.add_response data parameter should now only be used for multipart content. Instead, use the appropriate parameter amongst content, text, html or stream. * Type information is now provided following [PEP 561](https://www.python.org/dev/peps/pep-0561/) (many thanks to [Caleb Ho](https://github.com/calebho)). Steve Kowalik 2022-03-03 00:17:37 +00:00
  • b487640c67 Accepting request 897235 from devel:languages:python:pytest Dominique Leuenberger 2021-07-11 23:24:52 +00:00
  • 3afd118867 Accepting request 897170 from home:alarrosa:branches:devel:languages:python:pytest Markéta Machová 2021-06-03 15:29:06 +00:00