'A multipart email with text/plain and text/html is sent
if the html_email_template parameter is passed to the view'

def test_html_mail_template(self):

    response = self.client.post('/password_reset/html_email_template/', {'email': 'staffmember@example.com'})
    self.assertEqual(response.status_code, 302)
    self.assertEqual(len(mail.outbox), 1)
    message = mail.outbox[0].message()
    self.assertEqual(len(message.get_payload()), 2)
    self.assertTrue(message.is_multipart())
    self.assertEqual(message.get_payload(0).get_content_type(), 'text/plain')
    self.assertEqual(message.get_payload(1).get_content_type(), 'text/html')
    self.assertNotIn('<html>', message.get_payload(0).get_payload())
    self.assertIn('<html>', message.get_payload(1).get_payload())
