~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

[r=sinzui][bug=568128] A branch is private if it is stacked on any
        private branches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
936
936
            charlie, BranchSubscriptionNotificationLevel.NOEMAIL, None,
937
937
            CodeReviewNotificationLevel.FULL, charlie)
938
938
        # Make both branches private.
939
 
        removeSecurityProxy(bmp.source_branch).private = True
940
 
        removeSecurityProxy(bmp.target_branch).private = True
 
939
        removeSecurityProxy(bmp.source_branch).explicitly_private = True
 
940
        removeSecurityProxy(bmp.target_branch).explicitly_private = True
941
941
        recipients = bmp.getNotificationRecipients(
942
942
            CodeReviewNotificationLevel.FULL)
943
943
        self.assertFalse(bob in recipients)
1164
1164
        # proposals that the logged in user is able to see.
1165
1165
        proposal = self._make_merge_proposal('albert', 'november', 'work')
1166
1166
        # Mark the source branch private.
1167
 
        removeSecurityProxy(proposal.source_branch).private = True
 
1167
        removeSecurityProxy(proposal.source_branch).explicitly_private = True
1168
1168
        self._make_merge_proposal('albert', 'mike', 'work')
1169
1169
 
1170
1170
        albert = getUtility(IPersonSet).getByName('albert')
1203
1203
        proposal = self._make_merge_proposal(
1204
1204
            'xray', 'november', 'work', registrant=albert)
1205
1205
        # Mark the source branch private.
1206
 
        removeSecurityProxy(proposal.source_branch).private = True
 
1206
        removeSecurityProxy(proposal.source_branch).explicitly_private = True
1207
1207
 
1208
1208
        november = getUtility(IProductSet).getByName('november')
1209
1209
        # The proposal is visible to charles.