~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/mail/tests/test_helpers.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-24 09:25:36 UTC
  • mfrom: (14593.2.17 apocalypta-0)
  • Revision ID: launchpad@pqm.canonical.com-20111224092536-rdgyq1kfsi3hunqr
[rs=sinzui][no-qa] Moved forgotten files to lp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from lp.services.mail.helpers import (
18
18
    ensure_not_weakly_authenticated,
19
19
    ensure_sane_signature_timestamp,
 
20
    get_contact_email_addresses,
20
21
    get_person_or_team,
21
22
    IncomingEmailError,
22
23
    parse_commands,
222
223
            team, get_person_or_team('fooix-devs@lists.example.com'))
223
224
 
224
225
 
 
226
class getContactEmailAddresses(TestCaseWithFactory):
 
227
    layer = DatabaseFunctionalLayer
 
228
 
 
229
    def test_user_with_preferredemail(self):
 
230
        user = self.factory.makePerson(
 
231
            email='user@canonical.com', name='user',)
 
232
        result = get_contact_email_addresses(user)
 
233
        self.assertEqual(set(['user@canonical.com']), result)
 
234
 
 
235
 
225
236
def test_suite():
226
237
    suite = DocTestSuite('lp.services.mail.helpers')
227
238
    suite.addTests(unittest.TestLoader().loadTestsFromName(__name__))