♻️(tests) refacto dimail tests with fixtures

test_api_mailboxes_create exceeded 1000 lines. By using fixtures, we can
at least factorize dimail response when token is ok or mailbox_data sent
to our API when creating a mailbox.
This commit is contained in:
Marie PUPO JEAMMET
2025-09-12 12:09:23 +02:00
committed by Marie
parent b24cb23a83
commit 4262f469d6
5 changed files with 337 additions and 473 deletions

View File

@@ -311,6 +311,9 @@ class Mailbox(AbstractBaseUser, BaseModel):
fields=["first_name", "last_name", "domain"],
name="unique_ox_display_name",
),
# Display name in OpenXChange must be unique
# To avoid sending failing requests to dimail,
# we impose uniqueness here too
]
ordering = ["-created_at"]