~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/doc/person.txt

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-23 09:54:33 UTC
  • mfrom: (14486.6.4 drop-obsolete-config-items)
  • Revision ID: launchpad@pqm.canonical.com-20111223095433-amgcz7yu4tsxrypz
[r=wgrant][no-qa] Drop various obsolete config definitions that were
        recently dropped from prod.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
    >>> from zope.component import getUtility
9
9
    >>> from lp.services.identity.interfaces.emailaddress import (
10
10
    ...     IEmailAddressSet)
11
 
    >>> from lp.services.webapp.testing import verifyObject
 
11
    >>> from canonical.launchpad.webapp.testing import verifyObject
12
12
    >>> from lp.registry.interfaces.person import (
13
13
    ...     IHasStanding,
14
14
    ...     IPerson,
66
66
Access to people (Persons or Teams) is done through the IPersonSet
67
67
utility:
68
68
 
69
 
    >>> from lp.services.webapp.testing import verifyObject
 
69
    >>> from canonical.launchpad.webapp.testing import verifyObject
70
70
 
71
71
    >>> verifyObject(IPersonSet, personset)
72
72
    True
108
108
Since this person has chosen to hide his email addresses they won't be
109
109
visible to other users which are not admins.
110
110
 
111
 
    >>> from lp.services.webapp.authorization import check_permission
 
111
    >>> from canonical.launchpad.webapp.authorization import check_permission
112
112
    >>> login('randomuser@randomhost.com')
113
113
    >>> check_permission('launchpad.View', email)
114
114
    True
278
278
Up to now there was no browser request we could use, so no caching was
279
279
done.
280
280
 
281
 
    >>> from lp.services.webapp.servers import LaunchpadTestRequest
 
281
    >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest
282
282
    >>> request = LaunchpadTestRequest()
283
283
    >>> print request.annotations.get('launchpad.person_to_account_cache')
284
284
    None
643
643
    >>> ubuntu_team.preferredemail.email
644
644
    u'support@ubuntu.com'
645
645
 
646
 
    >>> from lp.services.mail.helpers import get_contact_email_addresses
 
646
    >>> from canonical.launchpad.helpers import get_contact_email_addresses
647
647
    >>> get_contact_email_addresses(ubuntu_team)
648
648
    set(['support@ubuntu.com'])
649
649
 
1268
1268
 
1269
1269
Inactive products are excluded from the listings.
1270
1270
 
1271
 
    >>> from lp.testing import login
 
1271
    >>> from canonical.launchpad.ftests import login
1272
1272
    >>> from lp.registry.interfaces.product import IProductSet
1273
1273
    >>> firefox = getUtility(IProductSet).getByName('firefox')
1274
1274
    >>> login("mark@example.com")