fix(tests): A1 — fin du rebinding app.config.settings dans test_v54 (isolation rétablie, 1016/1016 verts)
FlowDeck CI / lint (push) Successful in 1m53s
FlowDeck CI / test (push) Failing after 3h8m45s
FlowDeck CI / docker (push) Skipped

Le rebind (`app.config.settings = Settings()`) laissait tous les modules déjà
importés (sso_provisioning, trash, …) sur un objet périmé : le test
test_v67_sso::test_env_config_fallback_when_table_empty échouait dès qu'il
tournait après test_v54 dans le même worker (-n auto). Mutation sur place
comme le préconise conftest.py.
This commit is contained in:
2026-09-30 20:19:09 -04:00
parent 1706ad1ee9
commit 465853ac59
+8 -1
View File
@@ -205,7 +205,14 @@ class TestV54TrashPurge:
os.environ["PROJECT_SYNC_ENABLED"] = "false"
import app.config
app.config.settings = app.config.Settings()
# In-place mutation, jamais de rebinding : les modules importés plus tôt
# (sso_provisioning, trash, …) gardent une référence à l'objet courant.
_s = app.config.settings
_s.database_url = f"sqlite:///{tmp.name}"
_s.app_secret_key = "test-secret"
_s.rate_limit_enabled = False
_s.backup_enabled = False
_s.project_sync_enabled = False
init_db()
with get_conn() as conn: