本文整理汇总了Python中pixelated.adapter.model.mail.InputMail.headers方法的典型用法代码示例。如果您正苦于以下问题:Python InputMail.headers方法的具体用法?Python InputMail.headers怎么用?Python InputMail.headers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pixelated.adapter.model.mail.InputMail
的用法示例。
在下文中一共展示了InputMail.headers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_for_save_adds_from
# 需要导入模块: from pixelated.adapter.model.mail import InputMail [as 别名]
# 或者: from pixelated.adapter.model.mail.InputMail import headers [as 别名]
def test_get_for_save_adds_from(self):
InputMail.FROM_EMAIL_ADDRESS = "[email protected]"
headers = {"Subject": "The subject", "Date": str(datetime.now()), "To": "[email protected]"}
input_mail = InputMail()
input_mail.headers = headers
self.assertEqual("[email protected]", input_mail.get_for_save(1, "SENT")[1][HEADERS_KEY]["From"])
示例2: test_get_for_save_adds_from
# 需要导入模块: from pixelated.adapter.model.mail import InputMail [as 别名]
# 或者: from pixelated.adapter.model.mail.InputMail import headers [as 别名]
def test_get_for_save_adds_from(self):
InputMail.FROM_EMAIL_ADDRESS = '[email protected]'
headers = {'Subject': 'The subject',
'Date': str(datetime.now()),
'To': '[email protected]'}
input_mail = InputMail()
input_mail.headers = headers
self.assertEqual('[email protected]', input_mail.get_for_save(1, 'SENT')[1][fields.HEADERS_KEY]['From'])