Force method to lower

This commit is contained in:
Eli Uriegas 2017-01-27 22:07:31 -06:00
parent 13803bdb30
commit dea8e16f49

View File

@ -9,7 +9,8 @@ async def local_request(method, uri, cookies=None, *args, **kwargs):
url = 'http://{host}:{port}{uri}'.format(host=HOST, port=PORT, uri=uri)
log.info(url)
async with aiohttp.ClientSession(cookies=cookies) as session:
async with getattr(session, method)(url, *args, **kwargs) as response:
async with getattr(
session, method.lower())(url, *args, **kwargs) as response:
response.text = await response.text()
response.body = await response.read()
return response