~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/scripts/tests/test_bugimport.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
import os
282
282
        transaction.commit()
283
283
        self.failIf(person.account is None, 'Person must have an account.')
284
284
        email = getUtility(IEmailAddressSet).new(
285
 
            'foo@preferred.com', person, account=person.account)
 
285
            'foo@preferred.com', person)
286
286
        person.setPreferredEmail(email)
287
287
        transaction.commit()
288
288
        self.assertEqual(person.preferredemail.email, 'foo@preferred.com')