fix:deadlock und doppelte Mails
This commit is contained in:
1 parent
b1531e41e1
commit
8b6f74f364
13 files changed
+69
-27
No files matched your search
@@ -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)
|
||||
Reference in new issue
Block a user