Commit f910dc2b authored by Filippos Giannakos's avatar Filippos Giannakos

astakos: Fix broken tests

Fix broken tests expecting only one sent email while the actual code
sends two.
parent cab4617c
......@@ -78,7 +78,7 @@ class TestUserActions(TestCase):
# Test if accept action works properly for unmoderated user.
res = accept(self.user1)
self.assertFalse(res.is_error())
self.assertEqual(len(mail.outbox), 1)
self.assertEqual(len(mail.outbox), 2)
# Test if check function fails properly for moderated user.
ok, _ = validate_user_action(self.user1, "ACCEPT")
......@@ -87,7 +87,7 @@ class TestUserActions(TestCase):
# Test if accept action fails properly for moderated user.
res = accept(self.user1)
self.assertTrue(res.is_error())
self.assertEqual(len(mail.outbox), 1)
self.assertEqual(len(mail.outbox), 2)
# Test if the rest of the actions can apply on a moderated user.
# User cannot be rejected.
......@@ -138,7 +138,7 @@ class TestUserActions(TestCase):
# Test if accept action works on rejected users.
res = accept(self.user1)
self.assertFalse(res.is_error())
self.assertEqual(len(mail.outbox), 1)
self.assertEqual(len(mail.outbox), 2)
def test_reactivation(self):
"""Test activation/deactivation logic."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment