Tests
This commit is contained in:
6
init.py
6
init.py
@ -7,7 +7,8 @@ from get_mysql import get_mysql
|
||||
import atexit
|
||||
from flask_apscheduler import APScheduler
|
||||
|
||||
def create():
|
||||
|
||||
def create(testing: bool = False):
|
||||
"""
|
||||
Erstellt die Flask-App inkl. Datenbank und Login-Manager.
|
||||
:return app:
|
||||
@ -25,7 +26,8 @@ def create():
|
||||
login_manager.login_view = "login"
|
||||
|
||||
# Shut down the scheduler when exiting the app
|
||||
atexit.register(lambda: scheduler.shutdown())
|
||||
if not testing:
|
||||
atexit.register(lambda: scheduler.shutdown())
|
||||
|
||||
@login_manager.user_loader
|
||||
def load_user(uid: int):
|
||||
|
||||
Reference in New Issue
Block a user