'If HTML emails are enabled, check outgoings emails are multipart and
that different html and plain text templates are used'

def test_html_email(self):

    userena_settings.USERENA_HTML_EMAIL = True
    userena_settings.USERENA_USE_PLAIN_TEMPLATE = True
    new_user = UserenaSignup.objects.create_user(**self.user_info)
    userena_settings.USERENA_HTML_EMAIL = False
    self.assertEqual(len(mail.outbox), 1)
    self.assertTrue((text_type(mail.outbox[0].message()).find('multipart/alternative') > (-1)))
    self.assertTrue((text_type(mail.outbox[0].message()).find('text/plain') > (-1)))
    self.assertTrue((text_type(mail.outbox[0].message()).find('text/html') > (-1)))
    self.assertTrue((text_type(mail.outbox[0].message()).find('<html>') > (-1)))
    self.assertTrue((text_type(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)))
