src/app.py : initialisation de l'authentification au démarrage (#73)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ from dash import Dash, Input, Output, State, dcc, html, page_container, page_reg
|
|||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from flask import Response
|
from flask import Response
|
||||||
|
|
||||||
|
from src.auth.setup import init_auth
|
||||||
from src.utils import DEVELOPMENT
|
from src.utils import DEVELOPMENT
|
||||||
from src.utils.cache import cache
|
from src.utils.cache import cache
|
||||||
|
|
||||||
@@ -50,6 +51,8 @@ cache.init_app(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
init_auth(app.server)
|
||||||
|
|
||||||
|
|
||||||
# robots.txt
|
# robots.txt
|
||||||
@app.server.route("/robots.txt")
|
@app.server.route("/robots.txt")
|
||||||
|
|||||||
@@ -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"
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user