Skip to content

Commit

Permalink
fixup! 🎨(dimail) factorize dimail response upon succesful mailbox cre…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
mjeammet committed Jan 29, 2025
1 parent 4752436 commit 470a3c2
Showing 1 changed file with 10 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,8 @@ def test_api_mailboxes__create_with_accent_success(role):
rsps.add(
rsps.POST,
re.compile(rf".*/domains/{mail_domain.name}/mailboxes/"),
body=str(
{
"email": f"{mailbox_values['local_part']}@{mail_domain.name}",
"password": "newpass",
"uuid": "uuid",
}
body=response_mailbox_created(
f"{mailbox_values['local_part']}@{mail_domain.name}"
),
status=status.HTTP_201_CREATED,
content_type="application/json",
Expand Down Expand Up @@ -347,12 +343,8 @@ def test_api_mailboxes__same_local_part_on_different_domains():
rsps.add(
rsps.POST,
re.compile(rf".*/domains/{access.domain.name}/mailboxes/"),
body=str(
{
"email": f"{mailbox_values['local_part']}@{access.domain.name}",
"password": "newpass",
"uuid": "uuid",
}
body=response_mailbox_created(
f"{mailbox_values['local_part']}@{access.domain.name}"
),
status=status.HTTP_201_CREATED,
content_type="application/json",
Expand Down Expand Up @@ -545,12 +537,8 @@ def test_api_mailboxes__domain_owner_or_admin_successful_creation_and_provisioni
rsp = rsps.add(
rsps.POST,
re.compile(rf".*/domains/{access.domain.name}/mailboxes/"),
body=str(
{
"email": f"{mailbox_data['local_part']}@{access.domain.name}",
"password": "newpass",
"uuid": "uuid",
}
body=response_mailbox_created(
f"{mailbox_data['local_part']}@{access.domain.name}"
),
status=status.HTTP_201_CREATED,
content_type="application/json",
Expand Down Expand Up @@ -764,12 +752,8 @@ def test_api_mailboxes__send_correct_logger_infos(mock_info, mock_error):
rsps.add(
rsps.POST,
re.compile(rf".*/domains/{access.domain.name}/mailboxes/"),
body=str(
{
"email": f"{mailbox_data['local_part']}@{access.domain.name}",
"password": "newpass",
"uuid": "uuid",
}
body=response_mailbox_created(
f"{mailbox_data['local_part']}@{access.domain.name}"
),
status=status.HTTP_201_CREATED,
content_type="application/json",
Expand Down Expand Up @@ -825,12 +809,8 @@ def test_api_mailboxes__sends_new_mailbox_notification(mock_info):
rsps.add(
rsps.POST,
re.compile(rf".*/domains/{access.domain.name}/mailboxes/"),
body=str(
{
"email": f"{mailbox_data['local_part']}@{access.domain.name}",
"password": "newpass",
"uuid": "uuid",
}
body=response_mailbox_created(
f"{mailbox_data['local_part']}@{access.domain}"
),
status=status.HTTP_201_CREATED,
content_type="application/json",
Expand Down

0 comments on commit 470a3c2

Please sign in to comment.