diff --git a/src/app.py b/src/app.py index d5ddb6f..1818d95 100644 --- a/src/app.py +++ b/src/app.py @@ -7,6 +7,7 @@ from dash import Dash, Input, Output, State, dcc, html, page_container, page_reg from dotenv import load_dotenv from flask import Response +from src.auth.setup import init_auth from src.utils import DEVELOPMENT from src.utils.cache import cache @@ -50,6 +51,8 @@ cache.init_app( }, ) +init_auth(app.server) + # robots.txt @app.server.route("/robots.txt") diff --git a/tests/auth/test_app_integration.py b/tests/auth/test_app_integration.py new file mode 100644 index 0000000..aa736e7 --- /dev/null +++ b/tests/auth/test_app_integration.py @@ -0,0 +1,8 @@ +def test_app_imports_cleanly(users_db_path): + from src.app import app + + assert app is not None + # Flask-Login manager attaché + assert "login_manager" in app.server.extensions or hasattr( + app.server, "login_manager" + )