コード例 #1
0
    def test_newsletter_expander(self):
        user = create_user()
        pn = Actions.newsletter(user)

        notifications = expander.expand(pn)
        self.assertEqual(len(notifications), 1)
        notification = notifications.pop()
        self.assertEqual(notification.recipient, user)
コード例 #2
0
 def test_newsletter_expander(self):
     user = create_user()
     pn = Actions.newsletter(user)
     
     notifications = expander.expand(pn)
     self.assertEqual(len(notifications), 1)
     notification = notifications.pop()
     self.assertEqual(notification.recipient, user)
コード例 #3
0
 def test_newsletter_expander_for_user_with_no_email(self):
     user = create_user(email="")
     pn = Actions.newsletter(user)
     self.assertFalse(user.email)
     notifications = expander.expand(pn)
     self.assertEqual(len(notifications), 0)
コード例 #4
0
 def test_newsletter_expander_for_user_with_no_email(self):
     user = create_user(email="")
     pn = Actions.newsletter(user)
     self.assertFalse(user.email)
     notifications = expander.expand(pn)
     self.assertEqual(len(notifications), 0)