~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/model/tests/test_bugsummary.py

[r=sinzui][bug=672596] [r=sinzui][bug=672596] Unsubscribe security
 contact when bug is made non-security and bug supervisor when bug is made
 public.

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
                3 - count)
246
246
 
247
247
    def test_makePrivate(self):
248
 
        product = self.factory.makeProduct()
249
 
        bug = self.factory.makeBug(product=product)
250
 
 
251
248
        person_a = self.factory.makePerson()
252
249
        person_b = self.factory.makePerson()
 
250
        product = self.factory.makeProduct()
 
251
        bug = self.factory.makeBug(product=product, owner=person_b)
 
252
 
253
253
        bug.subscribe(person=person_a, subscribed_by=person_a)
254
254
 
255
255
        # Make the bug private. We have to use the Python API to ensure
266
266
            1)
267
267
        self.assertEqual(
268
268
            self.getCount(person_b, BugSummary.product == product),
269
 
            0)
 
269
            1)
270
270
        # Confirm implicit subscriptions work too.
271
271
        self.assertEqual(
272
272
            self.getCount(bug.owner, BugSummary.product == product),