def test_html_email(self):
        """
        If HTML emails are enabled, check outgoings emails are multipart and
        that different html and plain text templates are used
        """
        userena_settings.USERENA_HTML_EMAIL = True
        userena_settings.USERENA_USE_PLAIN_TEMPLATE = True

        new_user = UserenaSignup.objects.create_user(**self.user_info)

        # Reset configuration
        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(-1 > text_type(mail.outbox[0].message()).find("<html>"))
        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)
dataset/ETHPy150Open bread-and-pepper/django-userena/userena/tests/tests_models.py/UserenaSignupModelTests.test_html_email/swapped operands of `>`