src/auth/routes.py : blueprint auth et fixtures de test (#73)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Colin Maudry
2026-04-20 17:35:06 +02:00
parent 8896726e09
commit 1c0fb0a960
3 changed files with 30 additions and 0 deletions
+23
View File
@@ -10,3 +10,26 @@ def users_db_path(monkeypatch, tmp_path):
reset_conn_for_tests()
yield db_path
reset_conn_for_tests()
@pytest.fixture
def app(users_db_path, monkeypatch):
from flask import Flask
from src.auth.setup import init_auth
app = Flask(__name__)
init_auth(app)
yield app
@pytest.fixture
def client(app):
return app.test_client()
@pytest.fixture
def mail_outbox(app):
mail = app.extensions["mail"]
with mail.record_messages() as outbox:
yield outbox