Skip to content

Commit

Permalink
Corrigindo testes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamilatta committed May 13, 2014
1 parent 4956d0a commit 4c9bdc0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scielomanager/articletrack/tests/tests_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def test_is_accepted_method_without_accepted_checkins(self):
self.assertFalse(article.is_accepted())


class CheckinWorflowLogTests(TestCase):
class CheckinWorkflowLogTests(TestCase):
"""
Every change of Checkin's status will generate a record with info about the current status of the checkin
This way is possible to audit the actions made with the related checkin
Expand All @@ -219,7 +219,7 @@ def test_new_checkin_no_log(self):
generate a new checkin, must not generate any log
"""
checkin = modelfactories.CheckinFactory()
logs = models.CheckinWorflowLog.objects.filter(checkin=checkin)
logs = models.CheckinWorkflowLog.objects.filter(checkin=checkin)
self.assertEqual(logs.count(), 0)

def test_checkin_send_to_review_log(self):
Expand All @@ -230,7 +230,7 @@ def test_checkin_send_to_review_log(self):
self.assertTrue(checkin.can_be_send_to_review())
checkin.send_to_review(user)

logs = models.CheckinWorflowLog.objects.filter(checkin=checkin, status=checkin.status, user=user)
logs = models.CheckinWorkflowLog.objects.filter(checkin=checkin, status=checkin.status, user=user)

self.assertEqual(logs.count(), 1)
self.assertEqual(logs[0].user, user)
Expand All @@ -249,7 +249,7 @@ def test_checkin_do_review_log(self):
self.assertTrue(checkin.can_be_reviewed())
checkin.do_review(user_review)

logs = models.CheckinWorflowLog.objects.filter(checkin=checkin, status=checkin.status, user=user_review)
logs = models.CheckinWorkflowLog.objects.filter(checkin=checkin, status=checkin.status, user=user_review)

self.assertEqual(logs.count(), 1)
self.assertEqual(logs[0].user, user_review)
Expand All @@ -273,7 +273,7 @@ def test_checkin_do_accept_log(self):
self.assertTrue(checkin.can_be_accepted())
checkin.accept(user_accept)

logs = models.CheckinWorflowLog.objects.filter(checkin=checkin, status=checkin.status, user=user_accept)
logs = models.CheckinWorkflowLog.objects.filter(checkin=checkin, status=checkin.status, user=user_accept)

self.assertEqual(logs.count(), 1)
self.assertEqual(logs[0].user, user_accept)
Expand All @@ -293,7 +293,7 @@ def test_checkin_do_reject_log(self):
self.assertTrue(checkin.can_be_rejected())
checkin.do_reject(user_reject, rejection_text)

logs = models.CheckinWorflowLog.objects.filter(checkin=checkin, status=checkin.status, user=user_reject)
logs = models.CheckinWorkflowLog.objects.filter(checkin=checkin, status=checkin.status, user=user_reject)

self.assertEqual(logs.count(), 1)
self.assertEqual(logs[0].user, user_reject)
Expand All @@ -319,7 +319,7 @@ def test_checkin_send_to_pending_log(self):
self.assertTrue(checkin.can_be_send_to_pending())
checkin.send_to_pending(user2_send_to_review)

logs = models.CheckinWorflowLog.objects.filter(checkin=checkin, status=checkin.status, user=user2_send_to_review)
logs = models.CheckinWorkflowLog.objects.filter(checkin=checkin, status=checkin.status, user=user2_send_to_review)

self.assertEqual(logs.count(), 1)
self.assertEqual(logs[0].user, user2_send_to_review)
Expand Down

0 comments on commit 4c9bdc0

Please sign in to comment.