Respx Versions Save

Mock HTTPX with awesome request patterns and response side effects 🦋

0.21.1

1 month ago

0.21.1 (27th March 2024)

Fixed

  • Fix files pattern not handling str and BytesIO, thanks @pierremonico for input (#260)

Added

  • Add support for None values in data pattern, thanks @slingshotvfx for issue (#259)

0.21.0

1 month ago

0.21.0 (19th March 2024)

Fixed

  • Fix matching request data when files are provided, thanks @ziima for input (#252)

Added

  • Add support for data__contains lookup (#252)
  • Add files pattern to support matching on uploads, thanks @ziima for input (#253)
  • Add SetCookie utility for easier mocking of response cookie headers, thanks @phha for input (#254)

Changed

0.20.2

9 months ago

0.20.2 (21st July 2023)

Fixed

  • Better assertion output for assert_all_called, thanks @sileht (#224)
  • Support for quoted path pattern matching, thanks @alexdrydew for input (#240)

Added

  • Enable content__contains pattern, thanks @rjprins (#236)
  • Added initial CONTRIBUTING.md, thanks @morenoh149 (#238)

Changed

  • Docs about retrieving mocked calls, thanks @tomhamiltonstubber (#230)
  • Docs about Router.assert_all_called(), thanks @BeyondEvil for input (#241)

0.20.1

1 year ago

0.20.1 (17th November 2022)

Fixed

  • Support HTTPX 0.23.1, thanks @g-as for input (#223)

Added

  • Officially support Python 3.11 (#223)
  • Run pre-commit hooks in CI workflow (#219)

Changed

  • Bump autoflake, thanks @antonagestam (#220)

Removed

  • Drop support for Python 3.6 (#218)

0.20.0

1 year ago

0.20.0 (16th September 2022)

Changed

  • Type Router.__getitem__ to not return optional routes, thanks @flaeppe (#216)
  • Change Call.response to raise instead of returning optional response (#217)
  • Change CallList.last to raise instead of return optional call (#217)
  • Type M() to not return optional pattern, by introducing a Noop pattern (#217)
  • Type Route.pattern to not be optional (#217)

Fixed

  • Correct type hints for side effects (#217)

Added

  • Runs mypy on both tests and respx (#217)
  • Added nox test session for python 3.11 (#217)
  • Added Call.has_response helper, now that .response raises (#217)

0.19.3

1 year ago

0.19.3 (14th September 2022)

Fixed

  • Fix typing for Route modulos arg
  • Respect patterns with empty value when using equal lookup (#206)
  • Use pytest asyncio auto mode (#212)
  • Fix mock decorator to work together with pytest fixtures (#213)
  • Wrap pytest function correctly, i.e. don't hide real function name (#213)

Changed

  • Enable mypy strict_optional (#201)

0.19.2

2 years ago

0.19.2 (3rd February 2022)

Fixed

  • Better cleanup before building egg, thanks @nebularazer (#198)

0.19.1

2 years ago

0.19.1 (10th Januari 2022)

Fixed

  • Allow first path segments containing colons, thanks @hannseman. (#192)
  • Fix license classifier, thanks @shadchin (#195)
  • Fix typos, thanks @kianmeng (#194)

0.19.0

2 years ago

0.19.0 (15th November 2021)

Fixed

  • Support HTTPX 0.21.0. (#189)
  • Use Session.notify when chaining nox sessions, thanks @flaeppe. (#188)
  • Add overloads to MockRouter.call, thanks @flaeppe. (#187)
  • Enhance AND pattern evaluation to fail fast. (#185)
  • Fix CallList assertion error message. (#178)

Changed

  • Prevent method and url as lookups in HTTP method helpers, thanks @flaeppe. (#183)
  • Fail pattern match when JSON path not found. (#184)

0.18.2

2 years ago

0.18.2 (22nd October 2021)

Fixed

  • Include extensions when instantiating request in HTTPCoreMocker (#176)