~rashi007/mailman/docsfix

« back to all changes in this revision

Viewing changes to src/mailman/handlers/tests/test_recipients.py

  • Committer: Barry Warsaw
  • Date: 2014-12-01 02:51:03 UTC
  • mto: (7264.4.22 py3)
  • mto: This revision was merged to the branch mainline in revision 7285.
  • Revision ID: barry@list.org-20141201025103-jvkuq92sptrrngiz
Checkpointing.

By using `six` I think I have most of the imports squared away.  There's
probably still uses of `unicode` built-ins that need fixing.

The idea is to first get the test suite running (which it doesn't yet), and
then to fix tests.

There's a bug in lazr.config which requires us to patch it for now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    ]
27
27
 
28
28
 
 
29
import six
29
30
import unittest
30
31
 
31
 
from zope.component import getUtility
32
32
from mailman.app.lifecycle import create_list
33
33
from mailman.config import config
34
34
from mailman.interfaces.member import DeliveryMode, DeliveryStatus, MemberRole
35
35
from mailman.interfaces.usermanager import IUserManager
36
36
from mailman.testing.helpers import specialized_message_from_string as mfs
37
37
from mailman.testing.layers import ConfigLayer
 
38
from zope.component import getUtility
38
39
 
39
40
 
40
41
 
218
219
        finally:
219
220
            config.pop('test_site_admin_unicode')
220
221
        self.assertEqual(len(msgdata['recipients']), 1)
221
 
        self.assertIsInstance(list(msgdata['recipients'])[0], unicode)
 
222
        self.assertIsInstance(list(msgdata['recipients'])[0], six.text_type)