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


Python Subscriber.email_address方法代码示例

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


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

示例1: test_empty_email

# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import email_address [as 别名]
    def test_empty_email(self):
        """Tests what appens when a subscriber has no email"""
        subscriber = Subscriber()
        subscriber.email_address = '[email protected]'
        subscriber.issues_to_receive = 0
        subscriber.save()
        subscriber = Subscriber()
        subscriber.email_address = ''
        subscriber.issues_to_receive = 0
        subscriber.save()
        lines = self.export_and_get_lines()

        self.assertEqual('[email protected]\n', lines)
开发者ID:rtouze,项目名称:GAabo,代码行数:15,代码来源:test_subscriber_exporter.py

示例2: test_two_email

# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import email_address [as 别名]
    def test_two_email(self):
        """Tests when we have two emails in generated file"""
        subscriber = Subscriber()
        subscriber.email_address = '[email protected]'
        subscriber.issues_to_receive = 0
        subscriber.save()
        subscriber = Subscriber()
        subscriber.email_address = '[email protected]'
        subscriber.issues_to_receive = 0
        subscriber.save()
        lines = self.export_and_get_lines()

        self.assertEqual('[email protected]\[email protected]\n', lines)
开发者ID:rtouze,项目名称:GAabo,代码行数:15,代码来源:test_subscriber_exporter.py

示例3: test_email_in_lowercase

# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import email_address [as 别名]
 def test_email_in_lowercase(self):
     """Tests that in generated file, the emails are in lower case"""
     subscriber = Subscriber()
     subscriber.issues_to_receive = 0
     subscriber.email_address = '[email protected]'
     subscriber.save()
     lines = self.export_and_get_lines()
      
     self.assertEqual('[email protected]', lines.strip())
开发者ID:rtouze,项目名称:GAabo,代码行数:11,代码来源:test_subscriber_exporter.py

示例4: test_remaining_issues_subscriber

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

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

示例5: test_one_email

# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import email_address [as 别名]
    def test_one_email(self):
        """Test retrieval of one subscriber's email"""
        subscriber = Subscriber()
        subscriber.issues_to_receive = 0
        subscriber.email_address = '[email protected]'
        subscriber.save()
        lines = self.export_and_get_lines()

        self.assertEqual('[email protected]', lines.strip())
开发者ID:rtouze,项目名称:GAabo,代码行数:11,代码来源:test_subscriber_exporter.py

示例6: test_subscriber_with_regular_and_special

# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import email_address [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

示例7: test_get_subs_by_lastname

# 需要导入模块: from subscriber import Subscriber [as 别名]
# 或者: from subscriber.Subscriber import email_address [as 别名]
    def test_get_subs_by_lastname(self):
        """Test subscriber by lastname retrieval using the adapter"""
        sub = Subscriber()
        sub.lastname = 'toto'
        sub.firstname = 'tata'
        sub.email_address = '[email protected]'
        sub.name_addition = 'foobar'
        sub.save()

        dict_list = SubscriberAdapter.get_subscribers_from_lastname('toto')
        new_sub = dict_list[0]
        self.assertEquals('toto', new_sub['lastname'])
        self.assertEquals('tata', new_sub['firstname'])
        self.assertEquals('[email protected]', new_sub['email_address'])
        self.assertEquals('foobar', new_sub['name_addition'])
        self.assertEquals(sub.identifier, new_sub['subscriber_id'])
开发者ID:rtouze,项目名称:GAabo,代码行数:18,代码来源:test_gaabo_controler.py


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