当前位置: 首页>>代码示例>>Python>>正文


Python Subscriber.hors_serie1方法代码示例

本文整理汇总了Python中subscriber.Subscriber.hors_serie1方法的典型用法代码示例。如果您正苦于以下问题:Python Subscriber.hors_serie1方法的具体用法?Python Subscriber.hors_serie1怎么用?Python Subscriber.hors_serie1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在subscriber.Subscriber的用法示例。


在下文中一共展示了Subscriber.hors_serie1方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_mail_sent_updated_special_issue

# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import hors_serie1 [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)
开发者ID:rtouze,项目名称:GAabo,代码行数:15,代码来源:test_subscriber.py

示例2: test_subscription_info_by_lastname

# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import hors_serie1 [as 别名]
    def test_subscription_info_by_lastname(self):
        """Test subscription info fields retrieved by the adapter"""
        sub = Subscriber()
        sub.lastname = 'toto'
        sub.subscription_date = date(2011, 10, 10)
        sub.issues_to_receive = 5
        sub.subs_beginning_issue = 32
        sub.subscription_price = 31.50
        sub.membership_price = 50.25
        sub.hors_serie1 = 1
        sub.ordering_type = 'pp'
        sub.comment = 'blahblah'
        sub.save()

        dict_list = SubscriberAdapter.get_subscribers_from_lastname('toto')
        new_sub = dict_list[0]
        self.assertEquals('10/10/2011', new_sub['subscription_date'])
        self.assertEquals('5', new_sub['issues_to_receive'])
        self.assertEquals('32', new_sub['subs_beginning_issue'])
        self.assertEquals('31,50', new_sub['subscription_price'])
        self.assertEquals('50,25', new_sub['membership_price'])
        self.assertEquals('1', new_sub['hors_serie1'])
        self.assertEquals('pp', new_sub['ordering_type'])
        self.assertEquals('blahblah', new_sub['comment'])
        self.assertEquals(sub.identifier, new_sub['subscriber_id'])
开发者ID:rtouze,项目名称:GAabo,代码行数:27,代码来源:test_gaabo_controler.py

示例3: test_export_for_special_issues

# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import hors_serie1 [as 别名]
    def test_export_for_special_issues(self):
        """Test the function to export subscriber list to send special issue"""
        subscriber = Subscriber()
        subscriber.lastname = 'toto'
        subscriber.hors_serie1 = 1
        subscriber.hors_serie2 = 0
        subscriber.hors_serie3 = 0
        subscriber.save()
        subscriber = Subscriber()
        subscriber.lastname = 'tata'
        subscriber.hors_serie1 = 0
        subscriber.hors_serie2 = 1
        subscriber.hors_serie3 = 0
        subscriber.save()

        self.exporter.do_export_special_issue()

        self.__test_presence_toto_tata()
开发者ID:rtouze,项目名称:GAabo,代码行数:20,代码来源:test_subscriber_exporter.py

示例4: test_subscriber_with_regular_and_special

# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import hors_serie1 [as 别名]
    def test_subscriber_with_regular_and_special(self):
        """Test when subscriber has both remaining regular and special issues"""
        subs = Subscriber()
        subs.issues_to_receive = 1
        subs.hors_serie1 = 1
        subs.email_address = '[email protected]'
        subs.save()
        lines = self.export_and_get_lines()

        self.assertEqual('', lines)
开发者ID:rtouze,项目名称:GAabo,代码行数:12,代码来源:test_subscriber_exporter.py

示例5: test_when_mail_already_sent

# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import hors_serie1 [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()))
开发者ID:rtouze,项目名称:GAabo,代码行数:15,代码来源:test_subscriber_exporter.py

示例6: save_basic_subscriber

# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import hors_serie1 [as 别名]
 def save_basic_subscriber(self):
     sub = Subscriber()
     sub.lastname = 'Doe'
     sub.firstname = 'John'
     sub.company = 'Apave'
     a = Address()
     a.city = 'Rouen'
     sub.address = a
     sub.issues_to_receive = 5
     sub.hors_serie1 = 6
     sub.subscription_price = 20
     sub.membership_price = 30
     sub.subscription_date = datetime.date(2011, 07, 12)
     sub.save()
开发者ID:rtouze,项目名称:GAabo,代码行数:16,代码来源:test_subscriber_exporter.py


注:本文中的subscriber.Subscriber.hors_serie1方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。