~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/model/tests/test_branchsubscription.py

  • Committer: Ian Booth
  • Date: 2011-07-13 00:07:05 UTC
  • mto: This revision was merged to the branch mainline in revision 13409.
  • Revision ID: ian.booth@canonical.com-20110713000705-1j19z6bcee30gg10
Team members can also modify a subscription

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
    def test_branch_team_owner_can_unsubscribe(self):
131
131
        """Branch team owner can unsubscribe someone from a branch.
132
132
 
133
 
        If the owner of a branch is a team, then the team owner can
134
 
        unsubscribe someone, but an arbitrary team member cannot.
 
133
        If the owner of a branch is a team, then the team members can
 
134
        unsubscribe someone.
135
135
        """
136
136
        team_owner = self.factory.makePerson()
137
137
        team_member = self.factory.makePerson()
143
143
        subscription = self.factory.makeBranchSubscription(
144
144
            branch=branch, person=subscriber, subscribed_by=subscribed_by)
145
145
        self.assertTrue(subscription.canBeUnsubscribedByUser(team_owner))
146
 
        self.assertFalse(subscription.canBeUnsubscribedByUser(team_member))
 
146
        self.assertTrue(subscription.canBeUnsubscribedByUser(team_member))