I removed chardet library and used cchardet to replace it.
Then I run unit test and got the error
TypeError: test_hello() missing 2 required positional arguments: 'test_client' and 'loop'
The test code is from website documentation.
# -*- coding: utf-8 -*-
from aiohttp import web
async def hello(request):
return web.Response(text='Hello, world')
async def test_hello(test_client, loop):
app = web.Application(loop=loop)
app.router.add_get('/', hello)
client = await test_client(app)
resp = await client.get('/')
assert resp.status == 200
text = await resp.text()
assert 'Hello, world' in text
Hi,
I removed
chardet
library and usedcchardet
to replace it. Then I run unit test and got the errorTypeError: test_hello() missing 2 required positional arguments: 'test_client' and 'loop'
The test code is from website documentation.
I'm not sure it's cchardet problem or not. 😞
Thank you.