We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84c07f9 commit 4e586c8Copy full SHA for 4e586c8
tests/test_client_functional.py
@@ -350,10 +350,16 @@ def handler_ok(request):
350
app.router.add_route('GET', '/redirect', handler_redirect)
351
352
resp = yield from client.get('/ok')
353
- assert resp.history == []
354
- assert resp.status == 200
+ try:
+ assert resp.history == []
355
+ assert resp.status == 200
356
+ finally:
357
+ resp.release()
358
359
resp_redirect = yield from client.get('/redirect')
- assert len(resp_redirect.history) == 1
- assert resp_redirect.history[0].status == 301
- assert resp_redirect.status == 200
360
361
+ assert len(resp_redirect.history) == 1
362
+ assert resp_redirect.history[0].status == 301
363
+ assert resp_redirect.status == 200
364
365
+ resp_redirect.release()
0 commit comments