diff --git a/tests/test_client_functional.py b/tests/test_client_functional.py index 7f91c236b2d..a8d854de96f 100644 --- a/tests/test_client_functional.py +++ b/tests/test_client_functional.py @@ -1484,7 +1484,6 @@ def stream(): resp.close() -@pytest.mark.xfail @asyncio.coroutine def test_POST_StreamReader(fname, loop, test_client): @asyncio.coroutine @@ -1493,7 +1492,7 @@ def handler(request): content = yield from request.read() with fname.open('rb') as f: expected = f.read() - assert request.content_length == str(len(expected)) + assert request.content_length == len(expected) assert content == expected return web.HTTPOk() @@ -1502,7 +1501,7 @@ def handler(request): app.router.add_post('/', handler) client = yield from test_client(app) - with fname.open() as f: + with fname.open('rb') as f: data = f.read() stream = aiohttp.StreamReader(loop=loop)