hurl/integration/tests_ok/large.py

15 lines
341 B
Python
Raw Normal View History

from app import app
2020-11-09 22:08:39 +03:00
from flask import make_response
from io import BytesIO
@app.route("/large")
2020-11-09 22:08:39 +03:00
def large():
result = BytesIO()
for _ in range(1024 * 1024 * 32):
result.write(b"0123456789abcdef")
2020-11-09 22:08:39 +03:00
data = result.getvalue()
resp = make_response(data)
resp.content_type = "application/octet-stream"
2020-11-09 22:08:39 +03:00
return resp