hurl/integration/tests_ok/hello.py

13 lines
323 B
Python
Raw Normal View History

from app import app
2020-09-15 14:48:58 +03:00
from flask import request
2020-08-27 10:07:46 +03:00
2020-08-27 10:07:46 +03:00
@app.route("/hello")
def hello():
assert len(request.headers) == 3
assert request.headers["Host"] == "localhost:8000"
assert request.headers["Accept"] == "*/*"
assert "User-Agent" in request.headers
2020-09-15 14:48:58 +03:00
assert len(request.data) == 0
return "Hello World!"