fix: use fresh Settings() in test, add LDAP_SEARCH_BASE to .env.example
This commit is contained in:
parent
46bde689b5
commit
f6587b813e
@ -8,4 +8,5 @@ SECRET_KEY=changeme-replace-in-production
|
|||||||
# APP_PREFIX=/uph
|
# APP_PREFIX=/uph
|
||||||
# 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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user