def _validate_message_contents(self, message):
self.assertTrue(message.is_multipart())<EOL>payload = message.get_payload()<EOL>self.assertEqual(len(payload), <NUM_LIT:2>)<EOL>plaintext_contenttype = payload[<NUM_LIT:0>]['<STR_LIT:Content-Type>']<EOL>self.assertTrue(plaintext_contenttype.startswith("<STR_LIT>"))<EOL>plaintext = payload[<NUM_LIT:0>].get_payload()<EOL>html_contenttype = payload[<NUM_LIT:1>]['<STR_LIT:Content-Type>']<EOL>self.assertTrue(html_contenttype.startswith("<STR_LIT>"))<EOL>htmltext = payload[<NUM_LIT:1>].get_payload()<EOL>converted_html = markdown.markdown(plaintext)<EOL>self.assertEqual("<STR_LIT>".format(converted_html),<EOL>htmltext.strip())<EOL>
Validate the contents and attachments of the message.