~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Stuart Bishop
  • Date: 2012-01-05 07:57:21 UTC
  • mfrom: (14635 devel)
  • mto: This revision was merged to the branch mainline in revision 14636.
  • Revision ID: stuart.bishop@canonical.com-20120105075721-ol7khggaclh7dgqj
Merged rocketfuel into db-deploy.

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