diff options
| author | Aurélien Bompard | 2014-11-27 16:56:42 +0100 |
|---|---|---|
| committer | Aurélien Bompard | 2014-11-27 16:56:42 +0100 |
| commit | 43b8f3f8faeccec1726466455f0affa9e98880d5 (patch) | |
| tree | c21eca83073cc3978b598e61f1f84218fe52f023 /src/mailman/handlers/tests/test_recipients.py | |
| parent | 11af7021249c5827c4c2d72a90fb4dd2321395c0 (diff) | |
| download | mailman-43b8f3f8faeccec1726466455f0affa9e98880d5.tar.gz mailman-43b8f3f8faeccec1726466455f0affa9e98880d5.tar.zst mailman-43b8f3f8faeccec1726466455f0affa9e98880d5.zip | |
Diffstat (limited to 'src/mailman/handlers/tests/test_recipients.py')
| -rw-r--r-- | src/mailman/handlers/tests/test_recipients.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mailman/handlers/tests/test_recipients.py b/src/mailman/handlers/tests/test_recipients.py index 04789c281..82f3714fa 100644 --- a/src/mailman/handlers/tests/test_recipients.py +++ b/src/mailman/handlers/tests/test_recipients.py @@ -198,3 +198,20 @@ To: test-owner@example.com msgdata = {} self._process(self._mlist, self._msg, msgdata) self.assertEqual(msgdata['recipients'], set(('noreply@example.com',))) + + def test_site_admin_unicode(self): + # Since the conf file is read as a bytestring, the site_owner is also a + # bytestring and must be converted to unicode when used as a fallback. + self._cris.unsubscribe() + self._dave.unsubscribe() + self.assertEqual(self._mlist.administrators.member_count, 0) + msgdata = {} + strconf = b""" + [mailman] + site_owner: siteadmin@example.com + """ + config.push("test_site_admin_unicode", strconf) + self._process(self._mlist, self._msg, msgdata) + config.pop("test_site_admin_unicode") + self.assertEqual(len(msgdata['recipients']), 1) + self.assertTrue(isinstance(list(msgdata['recipients'])[0], unicode)) |
