本文整理匯總了Python中email.errors.InvalidMultipartContentTransferEncodingDefect方法的典型用法代碼示例。如果您正苦於以下問題:Python errors.InvalidMultipartContentTransferEncodingDefect方法的具體用法?Python errors.InvalidMultipartContentTransferEncodingDefect怎麽用?Python errors.InvalidMultipartContentTransferEncodingDefect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類email.errors
的用法示例。
在下文中一共展示了errors.InvalidMultipartContentTransferEncodingDefect方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_multipart_invalid_cte
# 需要導入模塊: from email import errors [as 別名]
# 或者: from email.errors import InvalidMultipartContentTransferEncodingDefect [as 別名]
def test_multipart_invalid_cte(self):
with self._raise_point(
errors.InvalidMultipartContentTransferEncodingDefect):
msg = self._str_msg(
self.multipart_msg.format(
"\nContent-Transfer-Encoding: base64"))
if self.raise_expected: return
self.assertEqual(len(self.get_defects(msg)), 1)
self.assertIsInstance(self.get_defects(msg)[0],
errors.InvalidMultipartContentTransferEncodingDefect)
示例2: test_multipart_invalid_cte
# 需要導入模塊: from email import errors [as 別名]
# 或者: from email.errors import InvalidMultipartContentTransferEncodingDefect [as 別名]
def test_multipart_invalid_cte(self):
msg = self._str_msg(
self.multipart_msg.format("\nContent-Transfer-Encoding: base64"))
self.assertEqual(len(msg.defects), 1)
self.assertIsInstance(msg.defects[0],
errors.InvalidMultipartContentTransferEncodingDefect)
# test_defect_handling