~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/tests/test_bugchanges.py

Lint fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
208
208
        # Unsubscribing someone from a bug adds an item to the activity
209
209
        # log, but doesn't send an e-mail notification.
210
210
        subscriber = self.factory.makePerson(displayname='Mom')
211
 
        bug_subscription = self.bug.subscribe(self.user, subscriber)
 
211
        self.bug.subscribe(self.user, subscriber)
212
212
        self.saveOldChanges()
213
213
        # Only the user can unsubscribe him or her self.
214
214
        self.bug.unsubscribe(self.user, self.user)
602
602
    def test_tags_added(self):
603
603
        # Adding tags to a bug will add BugActivity and BugNotification
604
604
        # entries.
605
 
        old_tags = self.changeAttribute(
 
605
        self.changeAttribute(
606
606
            self.bug, 'tags', ['first-new-tag', 'second-new-tag'])
607
607
 
608
608
        tag_change_activity = {
626
626
        # entries.
627
627
        self.bug.tags = ['first-new-tag', 'second-new-tag']
628
628
        self.saveOldChanges()
629
 
        old_tags = self.changeAttribute(
 
629
        self.changeAttribute(
630
630
            self.bug, 'tags', ['first-new-tag'])
631
631
 
632
632
        tag_change_activity = {
1017
1017
        target = self.factory.makeDistributionSourcePackage()
1018
1018
        metadata_subscriber = self.newSubscriber(
1019
1019
            target, "dsp-metadata", BugNotificationLevel.METADATA)
1020
 
        lifecycle_subscriber = self.newSubscriber(
 
1020
        self.newSubscriber(
1021
1021
            target, "dsp-lifecycle", BugNotificationLevel.LIFECYCLE)
1022
1022
        new_target = self.factory.makeDistributionSourcePackage(
1023
1023
            distribution=target.distribution)
1739
1739
        # do not get any bug email that they generated themselves.
1740
1740
        self.user.selfgenerated_bugnotifications = False
1741
1741
 
1742
 
        old_description = self.changeAttribute(
 
1742
        self.changeAttribute(
1743
1743
            self.bug, 'description', 'New description')
1744
1744
 
1745
1745
        # self.user is not included among the recipients.
1756
1756
 
1757
1757
        self.user.selfgenerated_bugnotifications = False
1758
1758
 
1759
 
        old_description = self.changeAttribute(
 
1759
        self.changeAttribute(
1760
1760
            self.bug, 'description', 'New description')
1761
1761
 
1762
1762
        # self.user is not included among the recipients.
1771
1771
        self.bug.subscribe(team, self.user)
1772
1772
        self.bug.mute(self.user, self.user)
1773
1773
 
1774
 
        old_description = self.changeAttribute(
 
1774
        self.changeAttribute(
1775
1775
            self.bug, 'description', 'New description')
1776
1776
 
1777
1777
        # self.user is not included among the recipients.
1785
1785
        self.bug.subscribe(self.product_metadata_subscriber,
1786
1786
                           self.product_metadata_subscriber,
1787
1787
                           level=BugNotificationLevel.LIFECYCLE)
1788
 
        old_description = self.changeAttribute(
 
1788
        self.changeAttribute(
1789
1789
            self.bug, 'description', 'New description')
1790
1790
 
1791
1791
        # self.product_metadata_subscriber is not included among the