~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/launchpad/doc/account.txt

  • Committer: Jonathan Lange
  • Date: 2011-06-28 15:04:29 UTC
  • mto: This revision was merged to the branch mainline in revision 13324.
  • Revision ID: jml@canonical.com-20110628150429-w7lpc4ovh5jty1f0
Don't use syncUpdate

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.ftests import syncUpdate
216
215
    >>> from canonical.launchpad.interfaces.account import (
217
216
    ...     AccountCreationRationale)
218
217
 
236
235
    >>> passworded_account = account_set.new(
237
236
    ...     AccountCreationRationale.OWNER_CREATED_LAUNCHPAD , 'Passworded',
238
237
    ...     password=u'clear_password')
239
 
    >>> syncUpdate(passworded_account)
240
238
    >>> passworded_account.password == u'clear_password'
241
239
    False
242
240
 
246
244
    >>> clear_account = account_set.new(
247
245
    ...     AccountCreationRationale.OWNER_CREATED_LAUNCHPAD , 'Clear',
248
246
    ...     password=u'clear_password', password_is_encrypted=True)
249
 
    >>> syncUpdate(clear_account)
250
247
    >>> print clear_account.password
251
248
    clear_password
252
249
 
261
258
    >>> account = account_set.new(
262
259
    ...     AccountCreationRationale.USER_CREATED,
263
260
    ...     "Valid Account Test")
264
 
    >>> syncUpdate(account)
265
261
    >>> account.status = AccountStatus.ACTIVE
266
262
    >>> account.is_valid
267
263
    False