Skip to content

Commit

Permalink
test_models: test emails on builtin templates
Browse files Browse the repository at this point in the history
  • Loading branch information
swistakm committed Jan 23, 2014
1 parent 4b4299f commit 643218c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions userena/tests/tests_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ def test_html_email(self):
self.assertTrue(unicode(mail.outbox[0].message()).find("text/plain")>-1)
self.assertTrue(unicode(mail.outbox[0].message()).find("text/html")>-1)
self.assertTrue(unicode(mail.outbox[0].message()).find("<html>")>-1)

self.assertTrue(unicode(mail.outbox[0].message()).find("<h1>Test message")>-1)
self.assertFalse(mail.outbox[0].body.find("# Test message")>-1)
self.assertTrue(unicode(mail.outbox[0].message()).find("<p>Thank you for signing up")>-1)
self.assertFalse(mail.outbox[0].body.find("<p>Thank you for signing up")>-1)

def test_generated_plain_email(self):
"""
Expand All @@ -150,8 +149,8 @@ def test_generated_plain_email(self):
self.assertTrue(unicode(mail.outbox[0].message()).find("text/plain")>-1)
self.assertTrue(unicode(mail.outbox[0].message()).find("text/html")>-1)
self.assertTrue(unicode(mail.outbox[0].message()).find("<html>")>-1)
self.assertTrue(unicode(mail.outbox[0].message()).find("<h1>Test message")>-1)
self.assertTrue(mail.outbox[0].body.find("# Test message")>-1)
self.assertTrue(unicode(mail.outbox[0].message()).find("<p>Thank you for signing up")>-1)
self.assertTrue(mail.outbox[0].body.find("Thank you for signing up")>-1)

class BaseProfileModelTest(TestCase):
""" Test the ``BaseProfile`` model """
Expand Down

0 comments on commit 643218c

Please sign in to comment.