Commit 8cff1de
Add decorator support for assert_on_exception
The @responses.activate decorator now accepts an assert_on_exception
parameter, providing a convenient way to enable assertion checking
even when exceptions occur:
@responses.activate(
assert_all_requests_are_fired=True,
assert_on_exception=True
)
def test_my_api():
...
This is consistent with the existing decorator support for
assert_all_requests_are_fired and registry parameters.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 66ce1cb commit 8cff1de
2 files changed
+58
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
| 199 | + | |
| 200 | + | |
198 | 201 | | |
199 | 202 | | |
200 | 203 | | |
| |||
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
211 | 220 | | |
212 | 221 | | |
213 | 222 | | |
214 | 223 | | |
215 | 224 | | |
216 | 225 | | |
217 | 226 | | |
218 | | - | |
| 227 | + | |
219 | 228 | | |
220 | 229 | | |
221 | 230 | | |
| |||
225 | 234 | | |
226 | 235 | | |
227 | 236 | | |
228 | | - | |
229 | | - | |
| 237 | + | |
| 238 | + | |
230 | 239 | | |
231 | 240 | | |
232 | 241 | | |
| |||
1009 | 1018 | | |
1010 | 1019 | | |
1011 | 1020 | | |
| 1021 | + | |
1012 | 1022 | | |
1013 | | - | |
1014 | | - | |
| 1023 | + | |
1015 | 1024 | | |
1016 | 1025 | | |
1017 | 1026 | | |
| |||
1021 | 1030 | | |
1022 | 1031 | | |
1023 | 1032 | | |
| 1033 | + | |
1024 | 1034 | | |
1025 | 1035 | | |
1026 | 1036 | | |
| |||
1031 | 1041 | | |
1032 | 1042 | | |
1033 | 1043 | | |
| 1044 | + | |
1034 | 1045 | | |
1035 | 1046 | | |
1036 | 1047 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1268 | 1268 | | |
1269 | 1269 | | |
1270 | 1270 | | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
1271 | 1313 | | |
1272 | 1314 | | |
1273 | 1315 | | |
| |||
0 commit comments