Commit 29ff2ca 1 parent 78eb7b4 commit 29ff2ca Copy full SHA for 29ff2ca
File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1694,6 +1694,24 @@ async def handler(request):
1694
1694
resp .close ()
1695
1695
1696
1696
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
+
1697
1715
async def test_encoding_gzip_nochunk (loop , test_client ):
1698
1716
1699
1717
async def handler (request ):
You can’t perform that action at this time.
0 commit comments