~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • 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:
1
 
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2012 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
__metaclass__ = type
1243
1243
        self.identifier = self.makeOpenIdIdentifier(self.account, u'whatever')
1244
1244
        self.person = self.makePerson(self.account)
1245
1245
        self.email = self.makeEmailAddress(
1246
 
            email='whatever@example.com',
1247
 
            account=self.account, person=self.person)
 
1246
            email='whatever@example.com', person=self.person)
1248
1247
 
1249
1248
    def makeAccount(self):
1250
1249
        return self.store.add(Account(
1264
1263
            displayname='Displayname',
1265
1264
            creation_rationale=PersonCreationRationale.UNKNOWN))
1266
1265
 
1267
 
    def makeEmailAddress(self, email, account, person):
 
1266
    def makeEmailAddress(self, email, person):
1268
1267
            return self.store.add(EmailAddress(
1269
1268
                email=email,
1270
 
                account=account,
 
1269
                account=person.account,
1271
1270
                person=person,
1272
1271
                status=EmailAddressStatus.PREFERRED))
1273
1272