diff --git a/tests/app/test_configuration.py b/tests/app/test_configuration.py index f05924d6..2719df23 100644 --- a/tests/app/test_configuration.py +++ b/tests/app/test_configuration.py @@ -161,8 +161,6 @@ def test_smtp_bad_tls(testclient, backend, smtpd, configuration): @pytest.fixture def themed_testclient(app, configuration, backend): - configuration["TESTING"] = True - root = os.path.dirname(os.path.abspath(__file__)) test_theme_path = os.path.join(root, "fixtures", "themes", "test") configuration["CANAILLE"]["THEME"] = test_theme_path diff --git a/tests/app/test_logging.py b/tests/app/test_logging.py index 3d670f4f..49312792 100644 --- a/tests/app/test_logging.py +++ b/tests/app/test_logging.py @@ -31,7 +31,6 @@ format=[%(asctime)s] %(levelname)s in %(module)s: %(message)s def test_file_log_config(configuration, backend, tmp_path, smtpd, admin): - configuration["TESTING"] = True assert len(smtpd.messages) == 0 log_path = os.path.join(tmp_path, "canaille-by-file.log") @@ -63,7 +62,6 @@ def test_file_log_config(configuration, backend, tmp_path, smtpd, admin): def test_dict_log_config(configuration, backend, tmp_path, smtpd, admin): - configuration["TESTING"] = True assert len(smtpd.messages) == 0 log_path = os.path.join(tmp_path, "canaille-by-dict.log") configuration["CANAILLE"]["LOGGING"] = { diff --git a/tests/conftest.py b/tests/conftest.py index d76bc331..3cdd656e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -68,6 +68,7 @@ def configuration(smtpd): "SECRET_KEY": gen_salt(24), "SERVER_NAME": "canaille.test", "PREFERRED_URL_SCHEME": "http", + "TESTING": True, "CANAILLE": { "JAVASCRIPT": False, "LOGO": "/static/img/canaille-head.webp", @@ -174,7 +175,6 @@ def app(configuration, backend, jinja_cache_directory): @pytest.fixture def testclient(app): - app.config["TESTING"] = True app.jinja_env.undefined = StrictUndefined yield TestApp(app)