summaryrefslogtreecommitdiff
path: root/tests/end2end/fixtures/webserver_sub.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/end2end/fixtures/webserver_sub.py')
-rw-r--r--tests/end2end/fixtures/webserver_sub.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/end2end/fixtures/webserver_sub.py b/tests/end2end/fixtures/webserver_sub.py
index b7999148f..a4f54e19c 100644
--- a/tests/end2end/fixtures/webserver_sub.py
+++ b/tests/end2end/fixtures/webserver_sub.py
@@ -199,6 +199,16 @@ def set_cookies():
return r
+@app.route('/cookies/set-custom')
+def set_custom_cookie():
+ """Set a cookie with a custom max_age/expires."""
+ r = app.make_response(flask.redirect(flask.url_for('view_cookies')))
+ max_age = flask.request.args.get('max_age')
+ r.set_cookie(key='cookie', value='value',
+ max_age=int(max_age) if max_age else None)
+ return r
+
+
@app.route('/basic-auth/<user>/<passwd>')
def basic_auth(user='user', passwd='passwd'):
"""Prompt the user for authorization using HTTP Basic Auth."""