hurl/integration/tests/bytes.py

14 lines
306 B
Python
Raw Normal View History

2020-08-27 10:07:46 +03:00
from tests import app
from flask import make_response, request
from io import BytesIO
@app.route("/bytes")
2020-08-27 10:07:46 +03:00
def bytes():
result = BytesIO()
result.write(b"\x01\x02\x03")
2020-08-27 10:07:46 +03:00
data = result.getvalue()
resp = make_response(data)
resp.content_type = "application/octet-stream"
2020-08-27 10:07:46 +03:00
return resp