response.write should be synchronous for performance reasons

This commit is contained in:
Suby Raman
2017-02-22 10:42:16 -05:00
parent 1a8961587c
commit d8a6d7e02f
3 changed files with 10 additions and 8 deletions

View File

@@ -22,9 +22,9 @@ def test_response_body_not_a_string():
async def sample_streaming_fn(response):
await response.write('foo,')
response.write('foo,')
await asyncio.sleep(.001)
await response.write('bar')
response.write('bar')
@pytest.fixture