aio-libs / pytest-aiohttp

pytest plugin for aiohttp support
Apache License 2.0
134 stars 24 forks source link

chardet can't be replaced by cchardet #4

Closed grtfou closed 7 years ago

grtfou commented 7 years ago

Hi,

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

I'm not sure it's cchardet problem or not. 😞

Thank you.

asvetlov commented 7 years ago

Sure it isn't