From fe75fe21742a137b6c4f63dc35e3fb8ec4af7a31 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 5 Aug 2019 11:56:14 +0200 Subject: [PATCH] Add new tests --- app.py | 17 ++++++++++++++++- templates/link.html | 12 ++++++++++++ templates/locationhref.html | 15 +++++++++++++++ templates/locationreplace.html | 15 +++++++++++++++ templates/root.html | 17 +++++++++++++++++ 5 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 templates/link.html create mode 100644 templates/locationhref.html create mode 100644 templates/locationreplace.html create mode 100644 templates/root.html diff --git a/app.py b/app.py index f65dcc2..4a78f04 100644 --- a/app.py +++ b/app.py @@ -5,7 +5,22 @@ app = f.Flask(__name__) @app.route("/") def root_page(): - return 'Click on me!' + return f.render_template("root.html") + + +@app.route("/link") +def link_page(): + return f.render_template("link.html") + + +@app.route("/location/href") +def location_href_page(): + return f.render_template("locationhref.html") + + +@app.route("/location/replace") +def location_replace_page(): + return f.render_template("locationreplace.html") @app.route('/referer') diff --git a/templates/link.html b/templates/link.html new file mode 100644 index 0000000..d7d385f --- /dev/null +++ b/templates/link.html @@ -0,0 +1,12 @@ + + + + + a href + + + + Click on me! + + \ No newline at end of file diff --git a/templates/locationhref.html b/templates/locationhref.html new file mode 100644 index 0000000..1b31326 --- /dev/null +++ b/templates/locationhref.html @@ -0,0 +1,15 @@ + + + + + location.href + + + + + + \ No newline at end of file diff --git a/templates/locationreplace.html b/templates/locationreplace.html new file mode 100644 index 0000000..9a0d2e9 --- /dev/null +++ b/templates/locationreplace.html @@ -0,0 +1,15 @@ + + + + + location.replace + + + + + + \ No newline at end of file diff --git a/templates/root.html b/templates/root.html new file mode 100644 index 0000000..c5532a3 --- /dev/null +++ b/templates/root.html @@ -0,0 +1,17 @@ + + + + + Referer tests + + +

+ Referer tests +

+ + + \ No newline at end of file