本文整理汇总了Python中subscriber.Subscriber.mail_sent方法的典型用法代码示例。如果您正苦于以下问题:Python Subscriber.mail_sent方法的具体用法?Python Subscriber.mail_sent怎么用?Python Subscriber.mail_sent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类subscriber.Subscriber
的用法示例。
在下文中一共展示了Subscriber.mail_sent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_mail_sent_updated_special_issue
# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import mail_sent [as 别名]
def test_mail_sent_updated_special_issue(self):
sub = Subscriber()
sub.lastname = 'toto'
sub.issues_to_receive = 0
sub.hors_serie1 = 0
sub.mail_sent = 1
sub.save()
self.assertEqual(1, sub.mail_sent)
sub.hors_serie1 = 1
sub.save()
self.assertEqual(0, sub.mail_sent)
示例2: test_when_mail_already_sent
# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import mail_sent [as 别名]
def test_when_mail_already_sent(self):
"""Tests that a subscriber is not exported when he has already reveived
a resubscription mail and has not re subscribed"""
sub = Subscriber()
sub.lastname = 'toto'
sub.issues_to_receive = 0
sub.hors_serie1 = 0
sub.mail_sent = 1
sub.save()
self.exporter.do_export()
f = open_test_file()
self.assertEquals(1, len(f.readlines()))