Compare commits

...

1 Commits

Author SHA1 Message Date
Laurent Paoletti e8989d7f43 ⬆️(back) test
Signed-off-by: Laurent Paoletti <lp@providenz.fr>
2026-02-19 21:58:15 +01:00
3 changed files with 610 additions and 372 deletions
+1
View File
@@ -207,6 +207,7 @@ jobs:
- name: Run tests
run: uv run pytest -n 2
timeout-minutes: 30
security-trivy-critical:
permissions:
File diff suppressed because it is too large Load Diff
-30
View File
@@ -1,30 +0,0 @@
"""
Unit tests for the User model
"""
import pytest
from conversations.settings import Base
def test_invalid_settings_oidc_email_configuration():
"""
The OIDC_FALLBACK_TO_EMAIL_FOR_IDENTIFICATION and OIDC_ALLOW_DUPLICATE_EMAILS settings
should not be both set to True simultaneously.
"""
class TestSettings(Base):
"""Fake test settings."""
OIDC_FALLBACK_TO_EMAIL_FOR_IDENTIFICATION = True
OIDC_ALLOW_DUPLICATE_EMAILS = True
# The validation is performed during post_setup
with pytest.raises(ValueError) as excinfo:
TestSettings().post_setup()
# Check the exception message
assert str(excinfo.value) == (
"Both OIDC_FALLBACK_TO_EMAIL_FOR_IDENTIFICATION and "
"OIDC_ALLOW_DUPLICATE_EMAILS cannot be set to True simultaneously. "
)