~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/identity/doc/account.txt

  • Committer: Curtis Hovey
  • Date: 2011-12-18 13:56:51 UTC
  • mfrom: (14538.1.3 identity-apocalypse-0)
  • mto: This revision was merged to the branch mainline in revision 14547.
  • Revision ID: curtis.hovey@canonical.com-20111218135651-1xb4j1p47dkb83ws
merged base branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 
15
15
    >>> from zope.interface.verify import verifyObject
16
16
    >>> from lp.registry.interfaces.person import IPerson
17
 
    >>> from canonical.launchpad.interfaces.account import (
 
17
    >>> from lp.services.identity.interfaces.account import (
18
18
    ...     IAccount, IAccountSet)
19
19
 
20
20
    >>> account_set = getUtility(IAccountSet)
126
126
If we add a new guessed email address, it will be included in the
127
127
guessed list.
128
128
 
129
 
    >>> from canonical.launchpad.interfaces.emailaddress import (
 
129
    >>> from lp.services.identity.interfaces.emailaddress import (
130
130
    ...     EmailAddressStatus,
131
131
    ...     IEmailAddressSet,
132
132
    ...     )
184
184
When the status is changed, the date_status_set is updated in the
185
185
database. Only an admin can change the status.
186
186
 
187
 
    >>> from canonical.launchpad.interfaces.account import AccountStatus
 
187
    >>> from lp.services.identity.interfaces.account import AccountStatus
188
188
 
189
189
    >>> original_date_status_set = account.date_status_set
190
190
    >>> login('admin@canonical.com')
212
212
New Accounts are created using the AccountSet.new() method. The account
213
213
rationale and displayname are required.
214
214
 
215
 
    >>> from canonical.launchpad.interfaces.account import (
 
215
    >>> from lp.services.identity.interfaces.account import (
216
216
    ...     AccountCreationRationale)
217
217
    >>> from storm.store import Store
218
218
 
275
275
The account is still not valid because it has no preferred email.
276
276
Setting the email to preferred fixes this.
277
277
 
278
 
    >>> from canonical.launchpad.interfaces.emailaddress import EmailAddressStatus
 
278
    >>> from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
279
279
    >>> email.status = EmailAddressStatus.PREFERRED
280
280
    >>> account.is_valid
281
281
    True