'If HTML emails are enabled and plain text template are disabled,
check outgoings emails are multipart and that plain text is generated
from html body'

def test_generated_plain_email(self):

    userena_settings.USERENA_HTML_EMAIL = True
    userena_settings.USERENA_USE_PLAIN_TEMPLATE = False
    new_user = UserenaSignup.objects.create_user(**self.user_info)
    userena_settings.USERENA_HTML_EMAIL = False
    userena_settings.USERENA_USE_PLAIN_TEMPLATE = True
    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.assertTrue((mail.outbox[0].body.find('Thank    you    for    signing    up') > (-1)))
