fix:deadlock und doppelte Mails
CI / audit (push) Skipped
CI / checks (push) Failing after 3m21s
CI / image (push) Skipped

This commit is contained in:
marco.morath committed 2026-11-25 22:15:34 +01:00
1 parent b1531e41e1
commit 8b6f74f364
13 files changed
+69 -27

No files matched your search

+13
View File
@@ -32,6 +32,8 @@ def db_settings(tmp_path, monkeypatch: pytest.MonkeyPatch): # type: ignore[no-u
from surveybox import settings as settings_mod
monkeypatch.setenv("SURVEYBOX_DATA_DIR", str(tmp_path / "data"))
# Tests prüfen englische Texte; ohne Kontosprache gilt die Standardsprache
monkeypatch.setenv("SURVEYBOX_DEFAULT_LANGUAGE", "en")
settings_mod.get_settings.cache_clear()
db.get_engine.cache_clear()
engine = db.get_engine()
@@ -60,3 +62,14 @@ def client(app): # type: ignore[no-untyped-def]
with new_client(app) as c:
yield c
@pytest.fixture(autouse=True)
def _english_texts(): # type: ignore[no-untyped-def]
"""Texte außerhalb von Anfragen (Funktionen direkt aufgerufen) auf Englisch,
auch wenn in der CI die Übersetzungen kompiliert sind."""
from surveybox import i18n
token = i18n.set_language("en")
yield
i18n.reset_language(token)