From bcd4546d580398182d41733b3f0724e859be0fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kyle=20Bl=C3=B6m?= Date: Mon, 30 Jan 2017 09:13:43 -0800 Subject: [PATCH] Added new tests, new request logic, and handler file Added new tests for alternate uses for alternate range request types. Changed error handlnig for new request logic that simplifies the integration logic Moved the error handler and the content range handler to their own handler file to prevent circular imports. --- sanic/exceptions.py | 78 ++------------------------ sanic/handlers.py | 127 +++++++++++++++++++++++++++++++++++++++++++ sanic/response.py | 32 ----------- sanic/sanic.py | 4 +- sanic/static.py | 32 +++++------ tests/test_static.py | 39 ++++++++++++- 6 files changed, 188 insertions(+), 124 deletions(-) create mode 100644 sanic/handlers.py diff --git a/sanic/exceptions.py b/sanic/exceptions.py index 358d5f14..370882be 100644 --- a/sanic/exceptions.py +++ b/sanic/exceptions.py @@ -1,8 +1,3 @@ -from .response import text, html -from .log import log -from traceback import format_exc, extract_tb -import sys - TRACEBACK_STYLE = '''