-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨(dimail) send pending mailboxes upon domain activation #635
Conversation
f83a1f2
to
4e40e96
Compare
470a3c2
to
3bc4024
Compare
04ea13d
to
f0edee4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya quelques pétouilles dans les tests à corriger. Rien de bien méchant.
@@ -23,6 +23,28 @@ | |||
) | |||
|
|||
|
|||
@pytest.mark.django_db | |||
def test_admin_action__should_not_sync_if_domain_enabled(client): | |||
"""Test admin action to check health of some domains""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
la docstring n'est pas bonne
src/backend/mailbox_manager/admin.py
Outdated
@@ -13,9 +13,15 @@ | |||
@admin.action(description=_("Synchronise from dimail")) | |||
def sync_mailboxes_from_dimail(modeladmin, request, queryset): # pylint: disable=unused-argument | |||
"""Admin action to synchronize existing mailboxes from dimail to our database.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Peut-être rajouter qu'uniquement les boites mail des domaines enabled sont synchronisables.
|
||
|
||
@pytest.mark.django_db | ||
def test_admin_action__fetch_domain_status_from_dimail(client): | ||
def test_admin_action__should_not_sync_if_domain_enabled(client): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est l'inverse c'est pour les domains not enabled.
Mais est-ce que ça ne serait pas encore mieux d'avoir à la place de _admin_action__
qui est déjà dans le nom du module, l'action en question ? Ça serait plus facile de savoir tout de suite quelle action de l'admin on teste.
def test_admin_action__should_not_sync_if_domain_enabled(client): | |
def test_sync_mailboxes__should_not_sync_if_domain_is_not_enabled(client): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
absolument ! ouhla ça commence à sentir la fatigue, cette PR ^
f0edee4
to
c1dc4ea
Compare
def test_sync_mailboxes__should_not_sync_if_domain_is_not_enabled( | ||
domain_status, client | ||
): | ||
"""Mailboxes should not be sync'ed on non-enabled domaisn""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Mailboxes should not be sync'ed on non-enabled domaisn""" | |
"""Mailboxes should not be sync'ed on non-enabled domains""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il y a juste une petite typo à corriger.
Je te le tamponne.
b6eae39
to
01fa7b9
Compare
send creation requests to dimail for all pending mailboxes when domain goes from "pending" to "enabled".
dimail's ok response upon mailbox creation is used in several tests. All those tests now reference proper response available in fixtures.
Pending, failed and deactivated domains should not be sync'ed.
01fa7b9
to
c5f8cc3
Compare
Purpose
send creation requests to dimail for all pending mailboxes
when domain goes from "pending" to "enabled".
Proposal
Description...
For next PR