~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/tests/test_personroles.py

[r=sinzui][bug=885672] Allow users in project roles and the comment
 owner to hide/unhide bug comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
        roles = IPersonRoles(self.person)
116
116
        self.assertFalse(roles.isOneOfDrivers(sprint))
117
117
 
 
118
    def test_isBugSupervisor(self):
 
119
        # The person can be the bug supervisor of something, e.g. a product.
 
120
        product = self.factory.makeProduct(bug_supervisor=self.person)
 
121
        roles = IPersonRoles(self.person)
 
122
        self.assertTrue(roles.isBugSupervisor(product))
 
123
 
 
124
    def test_isSecurityContact(self):
 
125
        # The person can be the security contact of something, e.g. a product.
 
126
        product = self.factory.makeProduct(security_contact=self.person)
 
127
        roles = IPersonRoles(self.person)
 
128
        self.assertTrue(roles.isSecurityContact(product))
 
129
 
118
130
    def test_isOneOf(self):
119
131
        # Objects may have multiple roles that a person can fulfill.
120
132
        # Specifications are such a case.