Added brief documentation with an example for file_stream

Added test to ensure `file_stream()` works in the test suite.
This commit is contained in:
ashleysommer
2017-05-18 18:12:26 +10:00
parent e155fe403d
commit 181977ad4e
2 changed files with 14 additions and 0 deletions

View File

@@ -37,6 +37,10 @@ async def test_await(request):
async def test_file(request):
return await response.file(os.path.abspath("setup.py"))
@app.route("/file_stream")
async def test_file_stream(request):
return await response.file_stream(os.path.abspath("setup.py"),
chunk_size=1024)
# ----------------------------------------------- #
# Exceptions