Skip to content

Commit

Permalink
enable StreamReader support
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Feb 21, 2017
1 parent 22462a4 commit ca1e650
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_client_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,6 @@ def stream():
resp.close()


@pytest.mark.xfail
@asyncio.coroutine
def test_POST_StreamReader(fname, loop, test_client):
@asyncio.coroutine
Expand All @@ -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()
Expand All @@ -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)
Expand Down

0 comments on commit ca1e650

Please sign in to comment.