Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Modified tests to test that credit balance is formatted correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudi Giesler committed Jan 13, 2015
1 parent 7930752 commit cc37c6f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions go/billing/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def test_confirm_sent(self):
self.assertEqual(timestamp, notification.success)

def test_email_sent(self):
notification_id, res = self.mk_notification('0.701', '12.3475')
notification_id, res = self.mk_notification('0.701', '1234.5678')
notification = LowCreditNotification.objects.get(pk=notification_id)
self.assertTrue(res.get() is not None)
self.assertEqual(len(mail.outbox), 1)
Expand All @@ -642,8 +642,9 @@ def test_email_sent(self):
str(self.acc.user.email), str(self.acc.user.get_full_name()),
'70.100'),
email.subject)
print email.body
self.assertTrue('29.900%' in email.body)
self.assertTrue('12.34 credits' in email.body)
self.assertTrue('1,234.56 credits' in email.body)
self.assertTrue(self.django_user.get_full_name() in email.body)
self.assertTrue(str(notification.pk) in email.body)
self.assertTrue(str(self.acc.user.email) in email.body)

0 comments on commit cc37c6f

Please sign in to comment.