diff --git a/beer/beer.py b/beer/beer.py index 3398e56..2f5d8b9 100755 --- a/beer/beer.py +++ b/beer/beer.py @@ -4,6 +4,7 @@ from flask import Flask from flask import render_template +from flask import send_from_directory # pylint: disable=invalid-name app = Flask(__name__) @@ -22,6 +23,10 @@ def index(hours=None, minutes=None): data = render_template('beer.html', hours=hours, minutes=minutes) return data +@app.route('/favicon.ico') +def favicon(): + """ serve the favicon """ + return send_from_directory('static', 'favicon.ico') def main(): """ main func """ diff --git a/beer/static/favicon.ico b/beer/static/favicon.ico new file mode 100644 index 0000000..849d3b7 Binary files /dev/null and b/beer/static/favicon.ico differ diff --git a/staging_tests.sh b/staging_tests.sh index f5ac9af..4501259 100644 --- a/staging_tests.sh +++ b/staging_tests.sh @@ -8,17 +8,17 @@ echo "testing URL: ${TEST_URL}" CURL_OPTS='-s' # default curl ${CURL_OPTS} ${TEST_URL} | grep -q 'setHours( 17, 0);' -[ $? -ne 0 ] && exit 1 +[ $? -ne 0 ] && echo "Failed with default" && exit 1 # set 1 parameter hours=18 curl ${CURL_OPTS} ${TEST_URL}/${hours} | grep -q "setHours( ${hours}, 0);" -[ $? -ne 0 ] && exit 1 +[ $? -ne 0 ] && echo "Failed with 1 parameter set" && exit 1 # set 2 parameters minutes=30 curl ${CURL_OPTS} ${TEST_URL}/${hours}/${minutes} | grep -q "setHours( ${hours}, ${minutes});" -[ $? -ne 0 ] && exit 1 +[ $? -ne 0 ] && echo "Failed with 2 parameters set" && exit 1 echo "OK" exit 0