upgrade aiohttp for test_client

This commit is contained in:
Yun Xu
2018-02-26 22:08:05 -08:00
parent 224b56bd3a
commit 46ed2c5270
6 changed files with 76 additions and 76 deletions

View File

@@ -156,8 +156,8 @@ class MethodNotSupported(SanicException):
super().__init__(message)
self.headers = dict()
self.headers["Allow"] = ", ".join(allowed_methods)
if method in ['HEAD', 'PATCH', 'PUT', 'DELETE']:
self.headers['Content-Length'] = 0
# if method in ['HEAD', 'PATCH', 'PUT', 'DELETE']:
# self.headers['Content-Length'] = 0
@add_status_code(500)

View File

@@ -1,8 +1,8 @@
import traceback
from json import JSONDecodeError
from sanic.log import logger
HOST = '127.0.0.1'
PORT = 42101