respx2 2.0.0a1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- respx2-2.0.0a1/CHANGELOG.md +613 -0
- respx2-2.0.0a1/LICENSE.md +29 -0
- respx2-2.0.0a1/MANIFEST.in +12 -0
- respx2-2.0.0a1/PKG-INFO +109 -0
- respx2-2.0.0a1/README.md +74 -0
- respx2-2.0.0a1/respx2/__init__.py +56 -0
- respx2-2.0.0a1/respx2/__version__.py +1 -0
- respx2-2.0.0a1/respx2/api.py +116 -0
- respx2-2.0.0a1/respx2/fixtures.py +12 -0
- respx2-2.0.0a1/respx2/handlers.py +41 -0
- respx2-2.0.0a1/respx2/mocks.py +341 -0
- respx2-2.0.0a1/respx2/models.py +552 -0
- respx2-2.0.0a1/respx2/patterns.py +782 -0
- respx2-2.0.0a1/respx2/plugin.py +30 -0
- respx2-2.0.0a1/respx2/py.typed +0 -0
- respx2-2.0.0a1/respx2/router.py +490 -0
- respx2-2.0.0a1/respx2/transports.py +93 -0
- respx2-2.0.0a1/respx2/types.py +71 -0
- respx2-2.0.0a1/respx2/utils.py +157 -0
- respx2-2.0.0a1/respx2.egg-info/PKG-INFO +109 -0
- respx2-2.0.0a1/respx2.egg-info/SOURCES.txt +27 -0
- respx2-2.0.0a1/respx2.egg-info/dependency_links.txt +1 -0
- respx2-2.0.0a1/respx2.egg-info/entry_points.txt +2 -0
- respx2-2.0.0a1/respx2.egg-info/not-zip-safe +1 -0
- respx2-2.0.0a1/respx2.egg-info/requires.txt +2 -0
- respx2-2.0.0a1/respx2.egg-info/top_level.txt +1 -0
- respx2-2.0.0a1/setup.cfg +71 -0
- respx2-2.0.0a1/setup.py +40 -0
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
## [2.0.0a1] - 2026-11-27
|
|
2
|
+
|
|
3
|
+
- Forked from [RESPX](https://lundberg.github.io/respx/)
|
|
4
|
+
([original repository](https://github.com/lundberg/respx)).
|
|
5
|
+
- Switched the HTTP client dependency from `httpx` to `httpx2`.
|
|
6
|
+
- Switched the HTTP Core dependency from `httpcore` to `httpcore2`.
|
|
7
|
+
- Dropped support for Python versions earlier than 3.11.
|
|
8
|
+
|
|
9
|
+
# Changelog
|
|
10
|
+
|
|
11
|
+
All notable changes to this project will be documented in this file.
|
|
12
|
+
|
|
13
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and
|
|
14
|
+
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
15
|
+
|
|
16
|
+
## [0.23.1] - 2026-04-08
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- Fix regression causing `params` pattern to stop working under some conditions, by
|
|
21
|
+
doing a strict detection of `ANY` in multi items patterns (#313)
|
|
22
|
+
|
|
23
|
+
### CI
|
|
24
|
+
|
|
25
|
+
- Update workflows actions (#310)
|
|
26
|
+
|
|
27
|
+
## [0.23.0] - 2026-04-07
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- Fix `data` pattern with list value (#264)
|
|
32
|
+
- Fix and enhance incorrect documentations about iterable side effects (#287)
|
|
33
|
+
- Fix documentation typo, thanks @markhobson (#298)
|
|
34
|
+
- Fix support for multiple slashes `//` in URL path by not using `urljoin` when
|
|
35
|
+
prepending path, thanks @lewiscollard and @Skeen (#302)
|
|
36
|
+
- Type Route.respond json as `Any` to align with HTTPX, thanks @JacobHayes (#284)
|
|
37
|
+
- Properly handle `ANY` in `MuitiItems` patterns (#289)
|
|
38
|
+
|
|
39
|
+
### CI
|
|
40
|
+
|
|
41
|
+
- Fix test warnings (#267)
|
|
42
|
+
- Add Python 3.14 to test matrix, thanks @carlosdorneles-mb (#300)
|
|
43
|
+
- Update nix flake, mypy target and workflows (#306, #282)
|
|
44
|
+
|
|
45
|
+
## [0.22.0] - 2024-12-19
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
|
|
49
|
+
- Support HTTPX 0.28.0, thanks @ndhansen (#278)
|
|
50
|
+
|
|
51
|
+
### Removed
|
|
52
|
+
|
|
53
|
+
- Drop support for Python 3.7, to align with HTTPX 0.25.0 (#280)
|
|
54
|
+
|
|
55
|
+
### CI
|
|
56
|
+
|
|
57
|
+
- Update CI test to not fail fast and cancel workflows, thanks @flaeppe (#269)
|
|
58
|
+
- Add dependabot to check GitHub actions packages, thanks @flaeppe (#268)
|
|
59
|
+
- Add Python 3.13 to test suite, thanks @jairhenrique (#283)
|
|
60
|
+
|
|
61
|
+
## [0.21.1] - 2024-03-27
|
|
62
|
+
|
|
63
|
+
### Fixed
|
|
64
|
+
|
|
65
|
+
- Fix `files` pattern not handling `str` and `BytesIO`, thanks @pierremonico for input
|
|
66
|
+
(#260)
|
|
67
|
+
|
|
68
|
+
### Added
|
|
69
|
+
|
|
70
|
+
- Add support for `None` values in `data` pattern, thanks @slingshotvfx for issue (#259)
|
|
71
|
+
|
|
72
|
+
## [0.21.0] - 2024-03-19
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
|
|
76
|
+
- Fix matching request data when files are provided, thanks @ziima for input (#252)
|
|
77
|
+
|
|
78
|
+
### Added
|
|
79
|
+
|
|
80
|
+
- Add support for data\_\_contains lookup (#252)
|
|
81
|
+
- Add `files` pattern to support matching on uploads, thanks @ziima for input (#253)
|
|
82
|
+
- Add `SetCookie` utility for easier mocking of response cookie headers (#254)
|
|
83
|
+
|
|
84
|
+
### Changed
|
|
85
|
+
|
|
86
|
+
- Enhance documentation on iterable side effects (#255)
|
|
87
|
+
- Enhance documentation on named routes and add tip about a catch-all route (#257)
|
|
88
|
+
|
|
89
|
+
## [0.20.2] - 2023-07-21
|
|
90
|
+
|
|
91
|
+
### Fixed
|
|
92
|
+
|
|
93
|
+
- Better assertion output for `assert_all_called`, thanks @sileht (#224)
|
|
94
|
+
- Support for quoted path pattern matching, thanks @alexdrydew for input (#240)
|
|
95
|
+
|
|
96
|
+
### Added
|
|
97
|
+
|
|
98
|
+
- Enable content\_\_contains pattern, thanks @rjprins (#236)
|
|
99
|
+
- Added initial `CONTRIBUTING.md`, thanks @morenoh149 (#238)
|
|
100
|
+
|
|
101
|
+
### Changed
|
|
102
|
+
|
|
103
|
+
- Docs about retrieving mocked calls, thanks @tomhamiltonstubber (#230)
|
|
104
|
+
- Docs about `Router.assert_all_called()`, thanks @BeyondEvil for input (#241)
|
|
105
|
+
|
|
106
|
+
## [0.20.1] - 2022-11-18
|
|
107
|
+
|
|
108
|
+
### Fixed
|
|
109
|
+
|
|
110
|
+
- Support HTTPX 0.23.1, thanks @g-as for input (#223)
|
|
111
|
+
|
|
112
|
+
### Added
|
|
113
|
+
|
|
114
|
+
- Officially support Python 3.11 (#223)
|
|
115
|
+
- Run pre-commit hooks in CI workflow (#219)
|
|
116
|
+
|
|
117
|
+
### Changed
|
|
118
|
+
|
|
119
|
+
- Bump autoflake, thanks @antonagestam (#220)
|
|
120
|
+
|
|
121
|
+
### Removed
|
|
122
|
+
|
|
123
|
+
- Drop support for Python 3.6 (#218)
|
|
124
|
+
|
|
125
|
+
## [0.20.0] - 2022-09-16
|
|
126
|
+
|
|
127
|
+
### Changed
|
|
128
|
+
|
|
129
|
+
- Type `Router.__getitem__` to not return optional routes, thanks @flaeppe (#216)
|
|
130
|
+
- Change `Call.response` to raise instead of returning optional response (#217)
|
|
131
|
+
- Change `CallList.last` to raise instead of return optional call (#217)
|
|
132
|
+
- Type `M()` to not return optional pattern, by introducing a `Noop` pattern (#217)
|
|
133
|
+
- Type `Route.pattern` to not be optional (#217)
|
|
134
|
+
|
|
135
|
+
### Fixed
|
|
136
|
+
|
|
137
|
+
- Correct type hints for side effects (#217)
|
|
138
|
+
|
|
139
|
+
### Added
|
|
140
|
+
|
|
141
|
+
- Runs `mypy` on both tests and respx (#217)
|
|
142
|
+
- Added nox test session for python 3.11 (#217)
|
|
143
|
+
- Added `Call.has_response` helper, now that `.response` raises (#217)
|
|
144
|
+
|
|
145
|
+
## [0.19.3] - 2022-09-14
|
|
146
|
+
|
|
147
|
+
### Fixed
|
|
148
|
+
|
|
149
|
+
- Fix typing for Route modulos arg
|
|
150
|
+
- Respect patterns with empty value when using equal lookup (#206)
|
|
151
|
+
- Use pytest asyncio auto mode (#212)
|
|
152
|
+
- Fix mock decorator to work together with pytest fixtures (#213)
|
|
153
|
+
- Wrap pytest function correctly, i.e. don't hide real function name (#213)
|
|
154
|
+
|
|
155
|
+
### Changed
|
|
156
|
+
|
|
157
|
+
- Enable mypy strict_optional (#201)
|
|
158
|
+
|
|
159
|
+
## [0.19.2] - 2022-02-03
|
|
160
|
+
|
|
161
|
+
### Fixed
|
|
162
|
+
|
|
163
|
+
- Better cleanup before building egg, thanks @nebularazer (#198)
|
|
164
|
+
|
|
165
|
+
## [0.19.1] - 2022-01-10
|
|
166
|
+
|
|
167
|
+
### Fixed
|
|
168
|
+
|
|
169
|
+
- Allow first path segments containing colons, thanks @hannseman. (#192)
|
|
170
|
+
- Fix license classifier, thanks @shadchin (#195)
|
|
171
|
+
- Fix typos, thanks @kianmeng (#194)
|
|
172
|
+
|
|
173
|
+
## [0.19.0] - 2021-11-15
|
|
174
|
+
|
|
175
|
+
### Fixed
|
|
176
|
+
|
|
177
|
+
- Support HTTPX 0.21.0. (#189)
|
|
178
|
+
- Use Session.notify when chaining nox sessions, thanks @flaeppe. (#188)
|
|
179
|
+
- Add overloads to `MockRouter.__call__`, thanks @flaeppe. (#187)
|
|
180
|
+
- Enhance AND pattern evaluation to fail fast. (#185)
|
|
181
|
+
- Fix CallList assertion error message. (#178)
|
|
182
|
+
|
|
183
|
+
### Changed
|
|
184
|
+
|
|
185
|
+
- Prevent method and url as lookups in HTTP method helpers, thanks @flaeppe. (#183)
|
|
186
|
+
- Fail pattern match when JSON path not found. (#184)
|
|
187
|
+
|
|
188
|
+
## [0.18.2] - 2021-10-22
|
|
189
|
+
|
|
190
|
+
### Fixed
|
|
191
|
+
|
|
192
|
+
- Include extensions when instantiating request in HTTPCoreMocker. (#176)
|
|
193
|
+
|
|
194
|
+
## [0.18.1] - 2021-10-20
|
|
195
|
+
|
|
196
|
+
### Fixed
|
|
197
|
+
|
|
198
|
+
- Respect ordered param values. (#172)
|
|
199
|
+
|
|
200
|
+
### Changed
|
|
201
|
+
|
|
202
|
+
- Raise custom error types for assertion checks. (#174)
|
|
203
|
+
|
|
204
|
+
## [0.18.0] - 2021-10-14
|
|
205
|
+
|
|
206
|
+
### Fixed
|
|
207
|
+
|
|
208
|
+
- Downgrade `HTTPX` requirement to 0.20.0. (#170)
|
|
209
|
+
|
|
210
|
+
### Added
|
|
211
|
+
|
|
212
|
+
- Add support for matching param with _ANY_ value. (#167)
|
|
213
|
+
|
|
214
|
+
## [0.18.0b0] - 2021-09-15
|
|
215
|
+
|
|
216
|
+
### Changed
|
|
217
|
+
|
|
218
|
+
- Deprecate RESPX MockTransport in favour of HTTPX MockTransport. (#152)
|
|
219
|
+
|
|
220
|
+
### Fixed
|
|
221
|
+
|
|
222
|
+
- Support `HTTPX` 1.0.0b0. (#164)
|
|
223
|
+
- Allow tuples as params to align with httpx, thanks @shelbylsmith. (#151)
|
|
224
|
+
- Fix xfail marked tests. (#153)
|
|
225
|
+
- Only publish docs for upstream repo, thanks @hugovk. (#161)
|
|
226
|
+
|
|
227
|
+
### Added
|
|
228
|
+
|
|
229
|
+
- Add optional route arg to side effects. (#158)
|
|
230
|
+
|
|
231
|
+
## [0.17.1] - 2021-06-05
|
|
232
|
+
|
|
233
|
+
### Added
|
|
234
|
+
|
|
235
|
+
- Implement support for async side effects in router. (#147)
|
|
236
|
+
- Support mocking responses using asgi/wsgi apps. (#146)
|
|
237
|
+
- Added pytest fixture and configuration marker. (#150)
|
|
238
|
+
|
|
239
|
+
### Fixed
|
|
240
|
+
|
|
241
|
+
- Typo in import from examples.md, thanks @shelbylsmith. (#148)
|
|
242
|
+
- Fix pass-through test case. (#149)
|
|
243
|
+
|
|
244
|
+
## [0.17.0] - 2021-04-27
|
|
245
|
+
|
|
246
|
+
### Changed
|
|
247
|
+
|
|
248
|
+
- Require `HTTPX` 0.18.0 and implement the new transport API. (PR #142)
|
|
249
|
+
- Removed ASGI and WSGI transports from httpcore patch list. (PR #131)
|
|
250
|
+
- Don't pre-read mocked async response streams. (PR #136)
|
|
251
|
+
|
|
252
|
+
### Fixed
|
|
253
|
+
|
|
254
|
+
- Fixed syntax highlighting in docs, thanks @florimondmanca. (PR #134)
|
|
255
|
+
- Type check `route.return_value`, thanks @tzing. (PR #133)
|
|
256
|
+
- Fixed a typo in the docs, thanks @lewoudar. (PR #139)
|
|
257
|
+
|
|
258
|
+
### Added
|
|
259
|
+
|
|
260
|
+
- Added support for adding/removing patch targets. (PR #131)
|
|
261
|
+
- Added test session for python 3.10. (PR #140)
|
|
262
|
+
- Added RESPX Mock Swallowtail to README. (PR #128)
|
|
263
|
+
|
|
264
|
+
## [0.16.3] - 2020-12-14
|
|
265
|
+
|
|
266
|
+
### Fixed
|
|
267
|
+
|
|
268
|
+
- Fixed decorator `respx_mock` kwarg, mistreated as a `pytest` fixture. (PR #117)
|
|
269
|
+
- Fixed `JSON` pattern sometimes causing a `JSONDecodeError`. (PR #124)
|
|
270
|
+
|
|
271
|
+
### Added
|
|
272
|
+
|
|
273
|
+
- Snapshot and rollback of routes' pattern and name. (PR #120)
|
|
274
|
+
- Internally extracted a `RouteList` from `Router`. (PR #120)
|
|
275
|
+
- Auto registration of `Mocker` implementations and their `using` name. (PR #121)
|
|
276
|
+
- Added `HTTPXMocker`, optionally patching `HTTPX`. (PR #122)
|
|
277
|
+
|
|
278
|
+
### Changed
|
|
279
|
+
|
|
280
|
+
- Protected a routes' pattern to be modified. (PR #120)
|
|
281
|
+
|
|
282
|
+
## [0.16.2] - 2020-11-26
|
|
283
|
+
|
|
284
|
+
### Added
|
|
285
|
+
|
|
286
|
+
- Easier support for using HTTPX MockTransport. (PR #118)
|
|
287
|
+
- Support mixed case for `method__in` and `scheme__in` pattern lookups. (PR #113)
|
|
288
|
+
|
|
289
|
+
### Fixed
|
|
290
|
+
|
|
291
|
+
- Handle missing path in URL pattern (PR #113)
|
|
292
|
+
|
|
293
|
+
### Changed
|
|
294
|
+
|
|
295
|
+
- Refactored internal mocking vs `MockTransport`. (PR #112)
|
|
296
|
+
|
|
297
|
+
### Removed
|
|
298
|
+
|
|
299
|
+
- Dropped raw request support when parsing patterns (PR #113)
|
|
300
|
+
|
|
301
|
+
## [0.16.1] - 2020-11-16
|
|
302
|
+
|
|
303
|
+
### Added
|
|
304
|
+
|
|
305
|
+
- Extended `url` pattern with support for `HTTPX` proxy url format. (PR #110)
|
|
306
|
+
- Extended `host` pattern with support for regex lookup. (PR #110)
|
|
307
|
+
- Added `respx.request(...)`. (PR #111)
|
|
308
|
+
|
|
309
|
+
### Changed
|
|
310
|
+
|
|
311
|
+
- Deprecated old `MockTransport` in favour of `respx.mock(...)`. (PR #109)
|
|
312
|
+
- Wrapping actual `MockTransport` in `MockRouter`, instead of extending. (PR #109)
|
|
313
|
+
- Extracted a `HTTPXMock`, for transport patching, from `MockRouter`. (PR #109)
|
|
314
|
+
|
|
315
|
+
## [0.16.0] - 2020-11-13
|
|
316
|
+
|
|
317
|
+
One year since first release, yay!
|
|
318
|
+
|
|
319
|
+
### Removed
|
|
320
|
+
|
|
321
|
+
- Dropped all deprecated APIs and models, see `0.15.0` Changed section. (PR #105)
|
|
322
|
+
|
|
323
|
+
### Added
|
|
324
|
+
|
|
325
|
+
- Added support for content, data and json patterns. (PR #106)
|
|
326
|
+
- Automatic pattern registration when subclassing Pattern. (PR #108)
|
|
327
|
+
|
|
328
|
+
### Fixed
|
|
329
|
+
|
|
330
|
+
- Multiple snapshots to support nested mock routers. (PR #107)
|
|
331
|
+
|
|
332
|
+
## [0.15.1] - 2020-11-10
|
|
333
|
+
|
|
334
|
+
### Added
|
|
335
|
+
|
|
336
|
+
- Snapshot routes and mocks when starting router, rollback when stopping. (PR #102)
|
|
337
|
+
- Added support for base_url combined with pattern lookups. (PR #103)
|
|
338
|
+
- Added support for patterns/lookups to the HTTP method helpers. (PR #104)
|
|
339
|
+
|
|
340
|
+
### Fixed
|
|
341
|
+
|
|
342
|
+
- Fix to not clear routes added outside mock context when stopping router. (PR #102)
|
|
343
|
+
|
|
344
|
+
## [0.15.0] - 2020-11-09
|
|
345
|
+
|
|
346
|
+
### Added
|
|
347
|
+
|
|
348
|
+
- Added `respx.route(...)` with enhanced request pattern matching. (PR #96)
|
|
349
|
+
- Added support for AND/OR when request pattern matching. (PR #96)
|
|
350
|
+
- Added support for adding responses to a route using % operator. (PR #96)
|
|
351
|
+
- Added support for both `httpx.Response` and `MockResponse`. (PR #96)
|
|
352
|
+
- Enhanced Route (RequestPattern) with `.respond(...)` response details. (PR #96)
|
|
353
|
+
- Enhanced Route (RequestPattern) with `.pass_through()`. (PR #96)
|
|
354
|
+
- Add support for using route as side effect decorator. (PR #98)
|
|
355
|
+
- Add `headers` and `cookies` patterns. (PR #99)
|
|
356
|
+
- Add `contains` and `in` lookups. (PR #99)
|
|
357
|
+
- Introduced Route `.mock(...)` in favour of callbacks. (PR #101)
|
|
358
|
+
- Introduced Route `.return_value` and `.side_effect` setters. (PR #101)
|
|
359
|
+
|
|
360
|
+
### Changed
|
|
361
|
+
|
|
362
|
+
- Deprecated mixing of request pattern and response details in all API's. (PR #96)
|
|
363
|
+
- Deprecated passing http method as arg in `respx.add` in favour of `method=`. (PR #96)
|
|
364
|
+
- Deprecated `alias=...` in favour of `name=...` when adding routes. (PR #96)
|
|
365
|
+
- Deprecated `respx.aliases` in favour of `respx.routes`. (PR #96)
|
|
366
|
+
- Deprecated `RequestPattern` in favour of `Route`. (PR #96)
|
|
367
|
+
- Deprecated `ResponseTemplate` in favour of `MockResponse`. (PR #96)
|
|
368
|
+
- Deprecated `pass_through=` in HTTP method API's (PR #96)
|
|
369
|
+
- Deprecated `response` arg in side effects (callbacks). (PR #97)
|
|
370
|
+
- Stacked responses are now recorded on same route calls. (PR #96)
|
|
371
|
+
- Pass-through routes no longer capture real response in call stats. (PR #97)
|
|
372
|
+
- Stacked responses no longer keeps and repeats last response. (PR #101)
|
|
373
|
+
|
|
374
|
+
### Removed
|
|
375
|
+
|
|
376
|
+
- Removed support for regex `base_url`. (PR #96)
|
|
377
|
+
- Dropped support for `async` side effects (callbacks). (PR #97)
|
|
378
|
+
- Dropped support for mixing side effect (callback) and response details. (PR #97)
|
|
379
|
+
|
|
380
|
+
## [0.14.0] - 2020-10-15
|
|
381
|
+
|
|
382
|
+
### Added
|
|
383
|
+
|
|
384
|
+
- Added `text`, `html` and `json` content shorthands to ResponseTemplate. (PR #82)
|
|
385
|
+
- Added `text`, `html` and `json` content shorthands to high level API. (PR #93)
|
|
386
|
+
- Added support to set `http_version` for a mocked response. (PR #82)
|
|
387
|
+
- Added support for mocking by lowercase http methods, thanks @lbillinghamtn. (PR #80)
|
|
388
|
+
- Added query `params` to align with HTTPX API, thanks @jocke-l. (PR #81)
|
|
389
|
+
- Easier API to get request/response from call stats, thanks @SlavaSkvortsov. (PR #85)
|
|
390
|
+
- Enhanced test to verify better content encoding by HTTPX. (PR #78)
|
|
391
|
+
- Added Python 3.9 to supported versions and test suite, thanks @jairhenrique. (PR #89)
|
|
392
|
+
|
|
393
|
+
### Changed
|
|
394
|
+
|
|
395
|
+
- `ResponseTemplate.content` as proper getter, i.e. no resolve/encode to bytes. (PR #82)
|
|
396
|
+
- Enhanced headers by using HTTPX Response when encoding raw responses. (PR #82)
|
|
397
|
+
- Deprecated `respx.stats` in favour of `respx.calls`, thanks @SlavaSkvortsov. (PR #92)
|
|
398
|
+
|
|
399
|
+
### Fixed
|
|
400
|
+
|
|
401
|
+
- Recorded requests in call stats are pre-read like the responses. (PR #86)
|
|
402
|
+
- Postponed request decoding for enhanced performance. (PR #91)
|
|
403
|
+
- Lazy call history for enhanced performance, thanks @SlavaSkvortsov. (PR #92)
|
|
404
|
+
|
|
405
|
+
### Removed
|
|
406
|
+
|
|
407
|
+
- Removed auto setting the `Content-Type: text/plain` header. (PR #82)
|
|
408
|
+
|
|
409
|
+
## [0.13.0] - 2020-09-30
|
|
410
|
+
|
|
411
|
+
### Fixed
|
|
412
|
+
|
|
413
|
+
- Fixed support for `HTTPX` 0.15. (PR #77)
|
|
414
|
+
|
|
415
|
+
### Added
|
|
416
|
+
|
|
417
|
+
- Added global `respx.pop` api, thanks @paulineribeyre. (PR #72)
|
|
418
|
+
|
|
419
|
+
### Removed
|
|
420
|
+
|
|
421
|
+
- Dropped deprecated `HTTPXMock` in favour of `MockTransport`.
|
|
422
|
+
- Dropped deprecated `respx.request` in favour of `respx.add`.
|
|
423
|
+
- Removed `HTTPX` max version requirement in setup.py.
|
|
424
|
+
|
|
425
|
+
## [0.12.1] - 2020-08-21
|
|
426
|
+
|
|
427
|
+
### Fixed
|
|
428
|
+
|
|
429
|
+
- Fixed non-iterable pass-through responses. (PR #68)
|
|
430
|
+
|
|
431
|
+
## [0.12.0] - 2020-08-17
|
|
432
|
+
|
|
433
|
+
### Changed
|
|
434
|
+
|
|
435
|
+
- Dropped no longer needed `asynctest` dependency, in favour of built-in mock. (PR #69)
|
|
436
|
+
|
|
437
|
+
## [0.11.3] - 2020-08-13
|
|
438
|
+
|
|
439
|
+
### Fixed
|
|
440
|
+
|
|
441
|
+
- Fixed support for `HTTPX` 0.14.0. (PR #45)
|
|
442
|
+
|
|
443
|
+
## [0.11.2] - 2020-06-25
|
|
444
|
+
|
|
445
|
+
### Added
|
|
446
|
+
|
|
447
|
+
- Added support for pop'ing a request pattern by alias, thanks @radeklat. (PR #60)
|
|
448
|
+
|
|
449
|
+
## [0.11.1] - 2020-06-01
|
|
450
|
+
|
|
451
|
+
### Fixed
|
|
452
|
+
|
|
453
|
+
- Fixed mocking `HTTPX` clients instantiated with proxies. (PR #58)
|
|
454
|
+
- Fixed matching URL patterns with missing path. (PR #59)
|
|
455
|
+
|
|
456
|
+
## [0.11.0] - 2020-05-29
|
|
457
|
+
|
|
458
|
+
### Fixed
|
|
459
|
+
|
|
460
|
+
- Fixed support for `HTTPX` 0.13. (PR #57)
|
|
461
|
+
|
|
462
|
+
### Added
|
|
463
|
+
|
|
464
|
+
- Added support for mocking out `HTTP Core`.
|
|
465
|
+
- Added support for using mock transports with `HTTPX` clients without patching.
|
|
466
|
+
- Include LICENSE.md in source distribution, thanks @synapticarbors.
|
|
467
|
+
|
|
468
|
+
### Changed
|
|
469
|
+
|
|
470
|
+
- Renamed passed mock to decorated functions from `httpx_mock` to `respx_mock`.
|
|
471
|
+
- Renamed `HTTPXMock` to `MockTransport`, but kept a deprecated `HTTPXMock` subclass.
|
|
472
|
+
- Deprecated `respx.request()` in favour of `respx.add()`.
|
|
473
|
+
|
|
474
|
+
## [0.10.1] - 2020-03-11
|
|
475
|
+
|
|
476
|
+
### Fixed
|
|
477
|
+
|
|
478
|
+
- Fixed support for `HTTPX` 0.12.0. (PR #45)
|
|
479
|
+
|
|
480
|
+
## [0.10.0] - 2020-01-30
|
|
481
|
+
|
|
482
|
+
### Changed
|
|
483
|
+
|
|
484
|
+
- Refactored high level and internal api for better editor autocompletion. (PR #44)
|
|
485
|
+
|
|
486
|
+
## [0.9.0] - 2020-01-22
|
|
487
|
+
|
|
488
|
+
### Fixed
|
|
489
|
+
|
|
490
|
+
- Fixed usage of nested or parallel mock instances. (PR #39)
|
|
491
|
+
|
|
492
|
+
## [0.8.3] - 2020-01-10
|
|
493
|
+
|
|
494
|
+
### Fixed
|
|
495
|
+
|
|
496
|
+
- Fixed support for `HTTPX` 0.11.0 sync api. (PR #38)
|
|
497
|
+
|
|
498
|
+
## [0.8.2] - 2020-01-07
|
|
499
|
+
|
|
500
|
+
### Fixed
|
|
501
|
+
|
|
502
|
+
- Renamed refactored httpx internals. (PR #37)
|
|
503
|
+
|
|
504
|
+
## [0.8.1] - 2019-12-09
|
|
505
|
+
|
|
506
|
+
### Added
|
|
507
|
+
|
|
508
|
+
- Added support for configuring patterns `base_url`. (PR #34)
|
|
509
|
+
- Added manifest and `py.typed` files.
|
|
510
|
+
|
|
511
|
+
### Fixed
|
|
512
|
+
|
|
513
|
+
- Fixed support for `HTTPX` 0.9.3 refactorizations. (PR #35)
|
|
514
|
+
|
|
515
|
+
## [0.8] - 2019-11-27
|
|
516
|
+
|
|
517
|
+
### Added
|
|
518
|
+
|
|
519
|
+
- Added documentation built with `mkdocs`. (PR #30)
|
|
520
|
+
|
|
521
|
+
### Changed
|
|
522
|
+
|
|
523
|
+
- Dropped sync support and now requires `HTTPX` version 0.8+. (PR #32)
|
|
524
|
+
- Renamed `respx.mock` module to `respx.api`. (PR #29)
|
|
525
|
+
- Refactored tests- and checks-runner to `nox`. (PR #31)
|
|
526
|
+
|
|
527
|
+
## [0.7.4] - 2019-11-24
|
|
528
|
+
|
|
529
|
+
### Added
|
|
530
|
+
|
|
531
|
+
- Allowing assertions to be configured through decorator and context manager. (PR #28)
|
|
532
|
+
|
|
533
|
+
## [0.7.3] - 2019-11-21
|
|
534
|
+
|
|
535
|
+
### Added
|
|
536
|
+
|
|
537
|
+
- Allows `mock` decorator to be used as sync or async context manager. (PR #27)
|
|
538
|
+
|
|
539
|
+
## [0.7.2] - 2019-11-21
|
|
540
|
+
|
|
541
|
+
### Added
|
|
542
|
+
|
|
543
|
+
- Added `stats` to high level API and patterns, along with `call_count`. (PR #25)
|
|
544
|
+
|
|
545
|
+
### Fixed
|
|
546
|
+
|
|
547
|
+
- Allowing headers to be modified within a pattern match callback. (PR #26)
|
|
548
|
+
|
|
549
|
+
## [0.7.1] - 2019-11-20
|
|
550
|
+
|
|
551
|
+
### Fixed
|
|
552
|
+
|
|
553
|
+
- Fixed responses in call stats when using synchronous `HTTPX` client. (PR #23)
|
|
554
|
+
|
|
555
|
+
## [0.7] - 2019-11-19
|
|
556
|
+
|
|
557
|
+
### Added
|
|
558
|
+
|
|
559
|
+
- Added support for `pass_through` patterns. (PR #20)
|
|
560
|
+
- Added `assert_all_mocked` feature and setting. (PR #21)
|
|
561
|
+
|
|
562
|
+
### Changed
|
|
563
|
+
|
|
564
|
+
- Requires all `HTTPX` requests to be mocked.
|
|
565
|
+
|
|
566
|
+
## [0.6] - 2019-11-18
|
|
567
|
+
|
|
568
|
+
### Changed
|
|
569
|
+
|
|
570
|
+
- Renamed `activate` decorator to `mock`. (PR #15)
|
|
571
|
+
|
|
572
|
+
## [0.5] - 2019-11-18
|
|
573
|
+
|
|
574
|
+
### Added
|
|
575
|
+
|
|
576
|
+
- Added `assert_all_called` feature and setting. (PR #14)
|
|
577
|
+
|
|
578
|
+
### Changed
|
|
579
|
+
|
|
580
|
+
- Clears call stats when exiting decorator.
|
|
581
|
+
|
|
582
|
+
## [0.4] - 2019-11-16
|
|
583
|
+
|
|
584
|
+
### Changed
|
|
585
|
+
|
|
586
|
+
- Renamed python package to `respx`. (PR #12)
|
|
587
|
+
- Renamed `add()` to `request()` and added HTTP method shorthands. (PR #13)
|
|
588
|
+
|
|
589
|
+
## [0.3.1] - 2019-11-16
|
|
590
|
+
|
|
591
|
+
### Changed
|
|
592
|
+
|
|
593
|
+
- Renamed PyPI package to `respx`.
|
|
594
|
+
|
|
595
|
+
## [0.3] - 2019-11-15
|
|
596
|
+
|
|
597
|
+
### Added
|
|
598
|
+
|
|
599
|
+
- Exposes `responsex` high level API along with a `activate` decorator. (PR #5)
|
|
600
|
+
- Added support for custom pattern match callback function. (PR #7)
|
|
601
|
+
- Added support for repeated patterns. (PR #8)
|
|
602
|
+
|
|
603
|
+
## [0.2] - 2019-11-14
|
|
604
|
+
|
|
605
|
+
### Added
|
|
606
|
+
|
|
607
|
+
- Added support for any `HTTPX` concurrency backend.
|
|
608
|
+
|
|
609
|
+
## [0.1] - 2019-11-13
|
|
610
|
+
|
|
611
|
+
### Added
|
|
612
|
+
|
|
613
|
+
- Initial POC.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019, 5 Monkeys Agency AB
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
recursive-exclude .github *
|
|
2
|
+
recursive-exclude docs *
|
|
3
|
+
recursive-exclude tests *
|
|
4
|
+
exclude *.yaml
|
|
5
|
+
exclude *.xml
|
|
6
|
+
exclude flake.*
|
|
7
|
+
exclude noxfile.py
|
|
8
|
+
exclude CONTRIBUTING.md
|
|
9
|
+
include README.md
|
|
10
|
+
include CHANGELOG.md
|
|
11
|
+
include LICENSE.md
|
|
12
|
+
include respx2/py.typed
|