~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2012-01-05 05:05:42 UTC
  • mfrom: (14632.1.5 implied-account)
  • Revision ID: launchpad@pqm.canonical.com-20120105050542-b4m54slx2mqa8htl
[r=wgrant][no-qa] EmailAddressSet.new now infers account from person
        if not specified explicitly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
    >>> personset = getUtility(IPersonSet)
37
37
    >>> foobar = personset.getByName('name16')
38
 
    >>> emailset.new(email.email, foobar, account=foobar.account)
 
38
    >>> emailset.new(email.email, foobar)
39
39
    Traceback (most recent call last):
40
40
    ...
41
41
    EmailAddressAlreadyTaken: The email address '...' is already registered.
42
42
 
43
43
The email address verification is case insensitive as well:
44
44
 
45
 
    >>> emailset.new(email.email.upper(), foobar, account=foobar.account)
 
45
    >>> emailset.new(email.email.upper(), foobar)
46
46
    Traceback (most recent call last):
47
47
    ...
48
48
    EmailAddressAlreadyTaken: The email address '...' is already registered.
50
50
Registering a new email address works -- and preserves case -- though:
51
51
 
52
52
    >>> emailaddress = emailset.new(
53
 
    ...     'oink@Canonical.com', foobar, account=foobar.account)
 
53
    ...     'oink@Canonical.com', foobar)
54
54
    >>> emailaddress.email
55
55
    u'oink@Canonical.com'
56
56