fix: use fresh Settings() in test, add LDAP_SEARCH_BASE to .env.example

This commit is contained in:
Oliver Hofmann 2026-04-27 09:34:00 +02:00
parent 46bde689b5
commit f6587b813e
2 changed files with 4 additions and 3 deletions

View File

@ -9,3 +9,4 @@ SECRET_KEY=changeme-replace-in-production
# DATABASE_URL=mysql+pymysql://user:password@db:3306/efihub # DATABASE_URL=mysql+pymysql://user:password@db:3306/efihub
# SECRET_KEY=<python -c "import secrets; print(secrets.token_hex(32))"> # SECRET_KEY=<python -c "import secrets; print(secrets.token_hex(32))">
# LDAP_ENABLED=true # LDAP_ENABLED=true
# LDAP_SEARCH_BASE=OU=users,OU=EFI,OU=Faculties,DC=ADS1,DC=fh-nuernberg,DC=de

View File

@ -1,8 +1,8 @@
from app.core.config import get_settings from app.core.config import Settings
def test_new_config_fields_have_defaults(): def test_new_config_fields_have_defaults():
s = get_settings() s = Settings()
assert hasattr(s, "SECRET_KEY") assert hasattr(s, "SECRET_KEY")
assert hasattr(s, "LDAP_ENABLED") assert hasattr(s, "LDAP_ENABLED")
assert s.LDAP_ENABLED is False assert s.LDAP_ENABLED is False