1
0
Fork 0
forked from bton/matekasse

test favicon

This commit is contained in:
2000-Trek 2023-08-16 23:02:36 +02:00
parent bb7168e3ca
commit f3d2cb1e47
4 changed files with 10 additions and 5 deletions

View file

@ -1,5 +1,5 @@
import queue, time, uuid, json, logging, datetime, os 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_socketio import SocketIO, join_room, leave_room
from flask_session import Session from flask_session import Session
from markupsafe import escape from markupsafe import escape
@ -49,11 +49,11 @@ def create_app(test_config=None):
#website #website
@app.route('/favicon.ico') @app.route('/favicon.ico')
def favicon(): def favicon():
return url_for('static', filename='Logo_CCC.svg.png') return send_file("../static/Logo_CCC.svg.png")
@app.route('/socket.io.js') #@app.route('/socket.io.js')
def socketiojs(): #def socketiojs():
return url_for('static', filename='socket.io.js') # return url_for('static', filename='socket.io.js')
@app.route("/") @app.route("/")
def index(): def index():

View file

@ -12,6 +12,11 @@ def test_config():
assert not create_app()["app"].testing assert not create_app()["app"].testing
assert create_app({'TESTING': True})["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 #/adduser
def test_adduser(client): def test_adduser(client):
response = client.get('/adduser/user') response = client.get('/adduser/user')