521
521
synchronised_spphs.count())
523
def test_product_isAnyPillarOwner(self):
524
# Test isAnyPillarOwner for products
525
person = self.factory.makePerson()
526
owner = self.factory.makePerson()
527
self.factory.makeProduct(owner=owner)
528
self.assertTrue(owner.isAnyPillarOwner())
529
self.assertFalse(person.isAnyPillarOwner())
531
def test_projectgroup_isAnyPillarOwner(self):
532
# Test isAnyPillarOwner for project groups
533
person = self.factory.makePerson()
534
owner = self.factory.makePerson()
535
self.factory.makeProject(owner=owner)
536
self.assertTrue(owner.isAnyPillarOwner())
537
self.assertFalse(person.isAnyPillarOwner())
539
def test_distribution_isAnyPillarOwner(self):
540
# Test isAnyPillarOwner for distributions
541
person = self.factory.makePerson()
542
owner = self.factory.makePerson()
543
self.factory.makeDistribution(owner=owner)
544
self.assertTrue(owner.isAnyPillarOwner())
545
self.assertFalse(person.isAnyPillarOwner())
547
def test_product_isAnySecurityContact(self):
548
# Test isAnySecurityContact for products
549
person = self.factory.makePerson()
550
contact = self.factory.makePerson()
551
self.factory.makeProduct(security_contact=contact)
552
self.assertTrue(contact.isAnySecurityContact())
553
self.assertFalse(person.isAnySecurityContact())
555
def test_distribution_isAnySecurityContact(self):
556
# Test isAnySecurityContact for distributions
557
person = self.factory.makePerson()
558
contact = self.factory.makePerson()
559
self.factory.makeDistribution(security_contact=contact)
560
self.assertTrue(contact.isAnySecurityContact())
561
self.assertFalse(person.isAnySecurityContact())
524
564
class TestPersonStates(TestCaseWithFactory):