Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mjeammet
Copy link
Member

Purpose

send creation requests to dimail for all pending mailboxes
when domain goes from "pending" to "enabled".

Proposal

Description...

  • [] item 1...
  • [] item 2...

@mjeammet mjeammet self-assigned this Jan 10, 2025
@mjeammet mjeammet force-pushed the mpj/dimail/enable-pending-mailboxes branch 2 times, most recently from 4e78755 to f83a1f2 Compare January 15, 2025 16:48
send creation requests to dimail for all pending mailboxes
when domain goes from "pending" to "enabled".
@mjeammet mjeammet force-pushed the mpj/dimail/enable-pending-mailboxes branch from f83a1f2 to 4e40e96 Compare January 15, 2025 16:50
@mjeammet mjeammet marked this pull request as ready for review January 15, 2025 16:51
response.content.decode("utf-8").replace("'", '"')
)
# fix format to have actual json
dimail_data = json.loads(response.content.decode("utf-8").replace("'", '"'))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not response.json() ? (Question applies not just to this line, but everywhere in the codebase where we have the above form…)

Copy link
Member Author

@mjeammet mjeammet Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because dimail's reponse used to not be a valid json.
But it might be fixed but invisible because of our mock ... I'm going to check it out

Copy link
Member Author

@mjeammet mjeammet Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dimail's response seems to be a proper json now so I added it to fixtures and referenced it in all related tests

dimail's ok response upon mailbox creation is used in several tests.
All those tests now reference proper response available in fixtures.
## MAILBOXES


def response_mailbox_created(email_address):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure about this name. Caps or not caps ? WDYT @Morendil @sdemagny

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants