コード例 #1
0
ファイル: test_email.py プロジェクト: pombredanne/launchpad-3
 def test_send_removed_revision_emails_subscribed(self):
     """send_removed_revision_emails run when RevisionsRemoved emitted."""
     self.useBzrBranches(direct_database=True)
     db_branch, tree = self.create_branch_and_tree()
     db_branch.subscribe(db_branch.registrant,
                         BranchSubscriptionNotificationLevel.FULL,
                         BranchSubscriptionDiffSize.WHOLEDIFF,
                         CodeReviewNotificationLevel.FULL,
                         db_branch.registrant)
     self.assertEqual(0, len(list(RevisionMailJob.iterReady())))
     notify(events.RevisionsRemoved(db_branch, tree.branch, ['x']))
     self.assertEqual(1, len(list(RevisionMailJob.iterReady())))
コード例 #2
0
ファイル: test_email.py プロジェクト: pombredanne/launchpad-3
 def test_queue_tip_changed_email_jobs_subscribed(self):
     """A queue_tip_changed_email_jobs is run when TipChanged emitted."""
     self.useBzrBranches(direct_database=True)
     db_branch, tree = self.create_branch_and_tree()
     db_branch.subscribe(db_branch.registrant,
                         BranchSubscriptionNotificationLevel.FULL,
                         BranchSubscriptionDiffSize.WHOLEDIFF,
                         CodeReviewNotificationLevel.FULL,
                         db_branch.registrant)
     self.assertEqual(0, len(list(RevisionMailJob.iterReady())))
     notify(events.TipChanged(db_branch, tree.branch, True))
     self.assertEqual(1, len(list(RevisionMailJob.iterReady())))
コード例 #3
0
 def test_send_removed_revision_emails_subscribed(self):
     """send_removed_revision_emails run when RevisionsRemoved emitted."""
     self.useBzrBranches(direct_database=True)
     db_branch, tree = self.create_branch_and_tree()
     db_branch.subscribe(
         db_branch.registrant,
         BranchSubscriptionNotificationLevel.FULL,
         BranchSubscriptionDiffSize.WHOLEDIFF,
         CodeReviewNotificationLevel.FULL,
         db_branch.registrant)
     self.assertEqual(0, len(list(RevisionMailJob.iterReady())))
     notify(events.RevisionsRemoved(db_branch, tree.branch, ['x']))
     self.assertEqual(1, len(list(RevisionMailJob.iterReady())))
コード例 #4
0
 def test_queue_tip_changed_email_jobs_subscribed(self):
     """A queue_tip_changed_email_jobs is run when TipChanged emitted."""
     self.useBzrBranches(direct_database=True)
     db_branch, tree = self.create_branch_and_tree()
     db_branch.subscribe(
         db_branch.registrant,
         BranchSubscriptionNotificationLevel.FULL,
         BranchSubscriptionDiffSize.WHOLEDIFF,
         CodeReviewNotificationLevel.FULL,
         db_branch.registrant)
     self.assertEqual(0, len(list(RevisionMailJob.iterReady())))
     notify(events.TipChanged(db_branch, tree.branch, True))
     self.assertEqual(1, len(list(RevisionMailJob.iterReady())))