From f6587b813ebf4b52ab5dca41d8a11cc059f81e2b Mon Sep 17 00:00:00 2001 From: Oliver Hofmann Date: Mon, 27 Apr 2026 09:34:00 +0200 Subject: [PATCH] fix: use fresh Settings() in test, add LDAP_SEARCH_BASE to .env.example --- .env.example | 3 ++- tests/test_config.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 5e42099..ed1c0b4 100644 --- a/.env.example +++ b/.env.example @@ -8,4 +8,5 @@ SECRET_KEY=changeme-replace-in-production # APP_PREFIX=/uph # DATABASE_URL=mysql+pymysql://user:password@db:3306/efihub # SECRET_KEY= -# LDAP_ENABLED=true \ No newline at end of file +# LDAP_ENABLED=true +# LDAP_SEARCH_BASE=OU=users,OU=EFI,OU=Faculties,DC=ADS1,DC=fh-nuernberg,DC=de diff --git a/tests/test_config.py b/tests/test_config.py index 95639d8..7a588a0 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,8 +1,8 @@ -from app.core.config import get_settings +from app.core.config import Settings def test_new_config_fields_have_defaults(): - s = get_settings() + s = Settings() assert hasattr(s, "SECRET_KEY") assert hasattr(s, "LDAP_ENABLED") assert s.LDAP_ENABLED is False