Merge pull request #265 from youknowone/test-middleware-schedule

Prevent flooding of meaningless traceback in `sanic_endpoint_test`
This commit is contained in:
Eli Uriegas 2017-01-03 14:41:23 -06:00 committed by GitHub
commit 8a9b1fee14

View File

@ -22,9 +22,9 @@ def sanic_endpoint_test(app, method='get', uri='/', gather_request=True,
exceptions = []
if gather_request:
@app.middleware
def _collect_request(request):
results.append(request)
app.request_middleware.appendleft(_collect_request)
async def _collect_response(sanic, loop):
try: