def test_html(self):
     email = tasks.create_email_message(
         ['*****@*****.**'], '*****@*****.**', 'Subject', 'Email Body.', '<html>A</html>'
     )
     email.send()
     expected_alternatives = [('<html>A</html>', 'text/html')]
     self.assertEqual(mail.outbox[0].alternatives, expected_alternatives)
 def test_html(self):
     email = tasks.create_email_message(['*****@*****.**'],
                                        '*****@*****.**', 'Subject',
                                        'Email Body.', '<html>A</html>')
     email.send()
     expected_alternatives = [('<html>A</html>', 'text/html')]
     self.assertEqual(mail.outbox[0].alternatives, expected_alternatives)
 def test_no_html(self):
     email = tasks.create_email_message(
         ['*****@*****.**'], '*****@*****.**', 'Subject', 'Email Body.', ''
     )
     email.send()
     self.assertEqual(mail.outbox[0].attachments, [])
 def test_no_html(self):
     email = tasks.create_email_message(['*****@*****.**'],
                                        '*****@*****.**', 'Subject',
                                        'Email Body.', '')
     email.send()
     self.assertEqual(mail.outbox[0].attachments, [])