(mailbox) remove secondary email as required field

The secondary email address is no longer required for all creation
processes and we should not force the user to provide and store an
insecure email address.
This commit is contained in:
Sabrina Demagny
2025-04-08 22:14:08 +02:00
parent 99d7b23dc9
commit 7a1fc6b626
8 changed files with 89 additions and 32 deletions

View File

@@ -81,18 +81,6 @@ def test_models_mailboxes__domain_cannot_be_null():
# SECONDARY_EMAIL FIELD
def test_models_mailboxes__secondary_email_cannot_be_empty():
"""The "secondary_email" field should not be empty."""
with pytest.raises(exceptions.ValidationError, match="This field cannot be blank"):
factories.MailboxFactory(secondary_email="")
def test_models_mailboxes__secondary_email_cannot_be_null():
"""The "secondary_email" field should not be null."""
with pytest.raises(exceptions.ValidationError, match="This field cannot be null"):
factories.MailboxFactory(secondary_email=None)
@pytest.mark.parametrize(
"domain_status",
[