Skip to content

Commit

Permalink
some more coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurdarcet committed Nov 24, 2017
1 parent 29ff2ca commit 363abdd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_client_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -1796,6 +1796,26 @@ async def handler(request):
resp.close()


async def test_payload_content_length_by_chunks(loop, test_client):

async def handler(request):
resp = web.StreamResponse(headers={'content-length': '3'})
await resp.prepare(request)
await resp.write(b'answer')
await resp.write(b'')
request.transport.close()
return resp

app = web.Application()
app.router.add_get('/', handler)
client = await test_client(app)

resp = await client.get('/')
data = await resp.read()
assert data == b'ans'
resp.close()


async def test_chunked(loop, test_client):

async def handler(request):
Expand Down

0 comments on commit 363abdd

Please sign in to comment.