Skip to content

Commit 29ff2ca

Browse files
committed
test coverage for a branch in PayloadWriter
1 parent 78eb7b4 commit 29ff2ca

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/test_client_functional.py

+18
Original file line numberDiff line numberDiff line change
@@ -1694,6 +1694,24 @@ async def handler(request):
16941694
resp.close()
16951695

16961696

1697+
async def test_encoding_gzip_write_by_chunks(loop, test_client):
1698+
1699+
async def handler(request):
1700+
resp = web.Response(text='text' * 100)
1701+
resp.enable_compression(web.ContentCoding.gzip)
1702+
return resp
1703+
1704+
app = web.Application()
1705+
app.router.add_get('/', handler)
1706+
client = await test_client(app)
1707+
1708+
resp = await client.get('/')
1709+
assert 200 == resp.status
1710+
txt = await resp.text()
1711+
assert txt == 'text' * 100
1712+
resp.close()
1713+
1714+
16971715
async def test_encoding_gzip_nochunk(loop, test_client):
16981716

16991717
async def handler(request):

0 commit comments

Comments
 (0)