Skip to content

Commit

Permalink
Fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tonioo committed Jan 23, 2023
1 parent d4b7bdd commit f61c452
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions modoboa/admin/tests/test_alias.py
Expand Up @@ -156,10 +156,9 @@ def test_dlist(self):
)
self.assertEqual(dlist.recipients_count, 2)

self.ajax_post(
self.ajax_delete(
"{}?selection={}".format(
reverse("admin:alias_delete"), dlist.id),
{}
reverse("admin:alias_delete"), dlist.id)
)
self.assertRaises(
Alias.DoesNotExist, Alias.objects.get, address="all@test.com")
Expand All @@ -180,7 +179,7 @@ def test_forward(self):
)
self.assertEqual(fwd.recipients_count, 1)

self.ajax_post(
self.ajax_delete(
reverse("admin:alias_delete") + "?selection=%d"
% fwd.id, {}
)
Expand Down
5 changes: 2 additions & 3 deletions modoboa/limits/tests/test_user_limits.py
Expand Up @@ -162,10 +162,9 @@ def test_aliases_limit(self):
max_value=-1)
self._create_alias("alias3@test.com")
self._check_limit("mailbox_aliases", 3, -1)
self.ajax_post(
self.ajax_delete(
reverse("admin:alias_delete") + "?selection=%d"
% Alias.objects.get(address="alias2@test.com").id,
{}
% Alias.objects.get(address="alias2@test.com").id
)
self._check_limit("mailbox_aliases", 2, -1)

Expand Down

0 comments on commit f61c452

Please sign in to comment.