Skip to content

Commit

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


async def test_encoding_gzip_write_by_chunks(loop, test_client):

async def handler(request):
resp = web.Response(text='text' * 100)
resp.enable_compression(web.ContentCoding.gzip)
return resp

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

resp = await client.get('/')
assert 200 == resp.status
txt = await resp.text()
assert txt == 'text' * 100
resp.close()


async def test_encoding_gzip_nochunk(loop, test_client):

async def handler(request):
Expand Down

0 comments on commit 29ff2ca

Please sign in to comment.