Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
sdemagny committed Sep 30, 2024
1 parent fa05d69 commit 3a0b515
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ def test_api_mail_domain__accesses_delete_administrators():

def test_api_mail_domain__accesses_delete_owners():
"""
Users should be able to delete the mail_domain access of another user
for a mail_domain of which they are owner provided it is not an owner access.
An owner should be able to delete the mail domain access of another user including a owner access.
"""
authenticated_user = core_factories.UserFactory()
mail_domain = factories.MailDomainFactory(
Expand Down Expand Up @@ -127,7 +126,8 @@ def test_api_mail_domain__accesses_delete_owners_last_owner():
user=authenticated_user,
role=enums.MailDomainRoleChoices.OWNER,
)
assert models.MailDomainAccess.objects.count() == 1
factories.MailDomainAccessFactory.create_batch(9)
assert models.MailDomainAccess.objects.count() == 10

client = APIClient()
client.force_login(authenticated_user)
Expand All @@ -137,4 +137,4 @@ def test_api_mail_domain__accesses_delete_owners_last_owner():
)

assert response.status_code == status.HTTP_403_FORBIDDEN
assert models.MailDomainAccess.objects.count() == 1
assert models.MailDomainAccess.objects.count() == 10

0 comments on commit 3a0b515

Please sign in to comment.