本文整理汇总了Python中pixelated.adapter.mailstore.leap_mailstore.LeapMailStore.get_mails方法的典型用法代码示例。如果您正苦于以下问题:Python LeapMailStore.get_mails方法的具体用法?Python LeapMailStore.get_mails怎么用?Python LeapMailStore.get_mails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pixelated.adapter.mailstore.leap_mailstore.LeapMailStore
的用法示例。
在下文中一共展示了LeapMailStore.get_mails方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_mails_fails_for_invalid_mail_id
# 需要导入模块: from pixelated.adapter.mailstore.leap_mailstore import LeapMailStore [as 别名]
# 或者: from pixelated.adapter.mailstore.leap_mailstore.LeapMailStore import get_mails [as 别名]
def test_get_mails_fails_for_invalid_mail_id(self):
store = LeapMailStore(self.soledad)
try:
yield store.get_mails(['invalid'])
self.fail('Exception expected')
except Exception, e:
pass
示例2: test_get_mails
# 需要导入模块: from pixelated.adapter.mailstore.leap_mailstore import LeapMailStore [as 别名]
# 或者: from pixelated.adapter.mailstore.leap_mailstore.LeapMailStore import get_mails [as 别名]
def test_get_mails(self):
first_mdoc_id, _ = self._add_mail_fixture_to_soledad_from_file('mbox00000000')
second_mdoc_id, _ = self._add_mail_fixture_to_soledad_from_file('mbox00000001')
store = LeapMailStore(self.soledad)
mails = yield store.get_mails([first_mdoc_id, second_mdoc_id])
self.assertEqual(2, len(mails))
self.assertEqual('Itaque consequatur repellendus provident sunt quia.', mails[0].subject)
self.assertEqual('Error illum dignissimos autem eos aspernatur.', mails[1].subject)