From f3d2cb1e47c7f62ed3111fb79fd0e84ce156bdff Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Wed, 16 Aug 2023 23:02:36 +0200 Subject: [PATCH] test favicon --- Website/__init__.py | 10 +++++----- Website/__pycache__/__init__.cpython-311.pyc | Bin 27553 -> 27232 bytes .../test_website.cpython-311-pytest-7.4.0.pyc | Bin 41146 -> 42139 bytes tests/test_website.py | 5 +++++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Website/__init__.py b/Website/__init__.py index 497fcc6..1c585ad 100644 --- a/Website/__init__.py +++ b/Website/__init__.py @@ -1,5 +1,5 @@ import queue, time, uuid, json, logging, datetime, os -from flask import Flask, render_template, request, make_response, session, url_for, g +from flask import Flask, render_template, request, make_response, session, send_file, g from flask_socketio import SocketIO, join_room, leave_room from flask_session import Session from markupsafe import escape @@ -49,11 +49,11 @@ def create_app(test_config=None): #website @app.route('/favicon.ico') def favicon(): - return url_for('static', filename='Logo_CCC.svg.png') + return send_file("../static/Logo_CCC.svg.png") - @app.route('/socket.io.js') - def socketiojs(): - return url_for('static', filename='socket.io.js') + #@app.route('/socket.io.js') + #def socketiojs(): + # return url_for('static', filename='socket.io.js') @app.route("/") def index(): diff --git a/Website/__pycache__/__init__.cpython-311.pyc b/Website/__pycache__/__init__.cpython-311.pyc index 385456ece7513003a871ac5846908e23a07b5571..d5af4ffceba46610e64b7d2d30de4f890f948b4f 100644 GIT binary patch delta 2646 zcmb7_ZERCz6oBtXd)xJs^@FWr>$-ItD|GAXzF>eG7DNPO;0WLbrQ5x&9bG%$d&@_e zbSi@tqkOyxYGMfd838nrT>a+{jDH9*1QR03O^p7~1b>*|KSMP5o_jkebfDg>&(1yP zJ?A~=yytB%-lc!OLt8IdttN^*zc2fdKYPt;rA-y0kmjTDWJ-`5>91My2uD#T94DM7 zTp!{5N)O)Uv2iCIlAfaQ+Vw8HOuy3Y7$mUK;l=x{@e z7vIz`XC32aJm^`BZCo?!xM0QC=tjJYtE3%xoZA#~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cv1N|UD*n+{mnG3tq`t^?x#RGdHTu%5)Z@IMX| z5^mbpbHc&YJ%^t#+_rXK8}ZJr-7=G8_$z~!@_S+fHSV~xvC&xt+2@X5&rLtaPP7}` z@pO5VCOd$0ApfYe$U-0;_$+$=xpv8FkGM(MXFUD}ESg7#STIjM^lc=Gv8=*nbAAiV z83V#U?h-!*v&Fikjg8a#eQI0s?Z1Vp=fu#0`DD{eILCA$kgJ@!EJ$i3;O{ zZ)-hf;G2iz!-cm49RQw7j@O6p2c$ZbUyf?Rk-r?7!4bt=MjQ;q&xp~9LhCsa75c}o Z5U=SKMfoyAoS#@MzL*$Q6Q?VbKLK&@JiY(` diff --git a/tests/test_website.py b/tests/test_website.py index 34dfe36..3af725e 100644 --- a/tests/test_website.py +++ b/tests/test_website.py @@ -12,6 +12,11 @@ def test_config(): assert not create_app()["app"].testing assert create_app({'TESTING': True})["app"].testing +#basic tests +def test_favicon(client): + response = client.get("/favicon.ico") + assert response.status_code == 200 + #/adduser def test_adduser(client): response = client.get('/adduser/user')