From aca58c30daf39da676d333d49011bcec9a4ae771 Mon Sep 17 00:00:00 2001 From: Nicolas Ledez Date: Fri, 18 Oct 2024 16:05:03 +0200 Subject: [PATCH] Fix tests parameters & MAIL_DEBUG as integer --- .github/workflows/ci.yml | 3 ++- .vscode/launch.json | 3 ++- zou/app/config.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78eaa2e2bf..fa3406b5eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,4 +55,5 @@ jobs: py.test env: DEBUG: 1 - MAIL_DEBUG: 1 + MAIL_DEBUG_BODY: 1 + MAIL_ENABLED: False diff --git a/.vscode/launch.json b/.vscode/launch.json index 6e28dc7ca4..67f987e8d7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,8 @@ "FLASK_APP": "zou.app", "FLASK_DEBUG": "1", "DEBUG": "1", - "MAIL_DEBUG": "1" + "MAIL_DEBUG_BODY": "1", + "MAIL_ENABLED": "False" }, "args": ["run", "--no-reload"], "jinja": true, diff --git a/zou/app/config.py b/zou/app/config.py index e44a37fd76..a435561e48 100644 --- a/zou/app/config.py +++ b/zou/app/config.py @@ -81,7 +81,7 @@ MAIL_PORT = os.getenv("MAIL_PORT", 25) MAIL_USERNAME = os.getenv("MAIL_USERNAME", "") MAIL_PASSWORD = os.getenv("MAIL_PASSWORD", "") -MAIL_DEBUG = envtobool("MAIL_DEBUG", 0) +MAIL_DEBUG = int(os.getenv("MAIL_DEBUG", "0")) MAIL_DEBUG_BODY = envtobool("MAIL_DEBUG_BODY", False) MAIL_USE_TLS = envtobool("MAIL_USE_TLS", False) MAIL_USE_SSL = envtobool("MAIL_USE_SSL", False)