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)
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')