'Test build of html email behavior.'

@patch('email.utils.make_msgid', return_value='<mock@mock>')
def test_html_email(self, mock_make_msgid):

    html = '\n                                <!DOCTYPE    html>\n                                <html    lang="en"    xmlns="http://www.w3.org/1999/xhtml">\n                                                <head><meta    charset="UTF-8"></head>\n                                                <body>\n                                                        <div>\n                                                                <h1>Intruder    alert    at    apartment!!</h1>\n                                                        </div>\n                                                        <div>\n                                                                <img    alt="test.jpg"    src="cid:test.jpg"/>\n                                                        </div>\n                                                </body>\n                                </html>'
    msg = self.mailer.send_message('Test    msg', data={'html': html, 'images': ['test.jpg']})
    self.assertTrue(('Content-Type:    multipart/related' in msg))
