Exemple #1
0
 def test_get_formatted_message(self):
     message = MailMessage('forgot_password.html')
     message = message.get_formatted_message(
         ['http://example.com', 'http://example.com']
     )
     self.assertIn('<a href="http://example.com">http://example.com</a>',
                   message)
Exemple #2
0
 def test_incorrect_message_format(self):
     message = MailMessage('forgot_password.html')
     with self.assertRaises(Exception):
         message = message.get_formatted_message(
             'http://example.com', 'http://example.com')