diff options
Diffstat (limited to 'src/mailman/testing')
| -rw-r--r-- | src/mailman/testing/helpers.py | 18 | ||||
| -rw-r--r-- | src/mailman/testing/layers.py | 8 | ||||
| -rw-r--r-- | src/mailman/testing/mailman-fr.mo | bin | 1945 -> 1992 bytes | |||
| -rw-r--r-- | src/mailman/testing/mailman-fr.po | 12 | ||||
| -rw-r--r-- | src/mailman/testing/mailman-xx.mo | bin | 509 -> 515 bytes | |||
| -rw-r--r-- | src/mailman/testing/mailman-xx.po | 4 | ||||
| -rw-r--r-- | src/mailman/testing/testing.cfg | 7 |
7 files changed, 37 insertions, 12 deletions
diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py index 58c72d6d9..032b028a9 100644 --- a/src/mailman/testing/helpers.py +++ b/src/mailman/testing/helpers.py @@ -1,3 +1,4 @@ +# Copyright (C) 2008-2012 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # @@ -22,6 +23,7 @@ __metaclass__ = type __all__ = [ 'LogFileMark', 'TestableMaster', + 'body_line_iterator', 'call_api', 'digest_mbox', 'event_subscribers', @@ -412,3 +414,19 @@ class LogFileMark: with open(self._filename) as fp: fp.seek(self._filepos) return fp.readline() + + + +# In Python 2.6, body_line_iterator() uses a cStringIO.StringIO() which cannot +# handle unicode. In Python 2.7 this works fine. I hate version checks but +# this is the easiest way to handle it. OTOH, we could just use the manual +# way for all Python versions instead. +import sys +if sys.hexversion >= 0x2070000: + from email.iterators import body_line_iterator +else: + def body_line_iterator(msg, decode=False): + payload = msg.get_payload(decode=decode) + bytes_payload = payload.encode('utf-8') + for line in bytes_payload.splitlines(): + yield line diff --git a/src/mailman/testing/layers.py b/src/mailman/testing/layers.py index 04ab8f91f..41ef86935 100644 --- a/src/mailman/testing/layers.py +++ b/src/mailman/testing/layers.py @@ -17,6 +17,14 @@ """Mailman test layers.""" +# XXX 2012-03-23 BAW: Layers really really suck. For example, the +# test_owners_get_email() test requires that both the SMTPLayer and LMTPLayer +# be set up, but there's apparently no way to do that and make zope.testing +# happy. This causes no tests failures, but it does cause errors at the end +# of the full test run. For now, I'll ignore that, but I do want to +# eventually get rid of the zope.test* dependencies and use something like +# testresources or some such. + from __future__ import absolute_import, unicode_literals __metaclass__ = type diff --git a/src/mailman/testing/mailman-fr.mo b/src/mailman/testing/mailman-fr.mo Binary files differindex df721cb0f..5758baf60 100644 --- a/src/mailman/testing/mailman-fr.mo +++ b/src/mailman/testing/mailman-fr.mo diff --git a/src/mailman/testing/mailman-fr.po b/src/mailman/testing/mailman-fr.po index 5f8c910e2..ca4ce8c32 100644 --- a/src/mailman/testing/mailman-fr.po +++ b/src/mailman/testing/mailman-fr.po @@ -17,7 +17,7 @@ msgstr "" #: templates/en/masthead.txt:1 msgid "" -"Send $real_name mailing list submissions to\n" +"Send $display_name mailing list submissions to\n" "\t$got_list_email\n" "\n" "To subscribe or unsubscribe via the World Wide Web, visit\n" @@ -29,9 +29,9 @@ msgid "" "\t$got_owner_email\n" "\n" "When replying, please edit your Subject line so it is more specific than\n" -"\"Re: Contents of $real_name digest...\"" +"\"Re: Contents of $display_name digest...\"" msgstr "" -"Envoyez vos messages pour la liste $real_name à\n" +"Envoyez vos messages pour la liste $display_name à\n" "\t$got_list_email\n" "\n" "Pour vous (dés)abonner par le web, consultez\n" @@ -45,11 +45,11 @@ msgstr "" "\t$got_owner_email\n" "\n" "Si vous répondez, n'oubliez pas de changer l'objet du message afin\n" -"qu'il soit plus spécifique que « Re: Contenu du groupe de $real_name... »" +"qu'il soit plus spécifique que « Re: Contenu du groupe de $display_name... »" #: Mailman/Handlers/ToDigest.py:159 -msgid "$realname Digest, Vol $volume, Issue $issue" -msgstr "Groupe $realname, Vol. $volume, Parution $issue" +msgid "$mlist.display_name Digest, Vol $volume, Issue $digest_number" +msgstr "Groupe $mlist.display_name, Vol $volume, Parution $digest_number" #: Mailman/Handlers/ToDigest.py:205 msgid "digest header" diff --git a/src/mailman/testing/mailman-xx.mo b/src/mailman/testing/mailman-xx.mo Binary files differindex ecbad0364..bfc2e0845 100644 --- a/src/mailman/testing/mailman-xx.mo +++ b/src/mailman/testing/mailman-xx.mo diff --git a/src/mailman/testing/mailman-xx.po b/src/mailman/testing/mailman-xx.po index e2ad28c33..c6543d3d5 100644 --- a/src/mailman/testing/mailman-xx.po +++ b/src/mailman/testing/mailman-xx.po @@ -13,5 +13,5 @@ msgstr "" "Generated-By: pygettext.py 1.3\n" #: src/mailman/app/bounces.py:227 -msgid "$mlist.real_name mailing list probe message" -msgstr "ailing-may ist-lay $mlist.real_name obe-pray essage-may" +msgid "$mlist.display_name mailing list probe message" +msgstr "ailing-may ist-lay $mlist.display_name obe-pray essage-may" diff --git a/src/mailman/testing/testing.cfg b/src/mailman/testing/testing.cfg index 526093572..b7e80ff02 100644 --- a/src/mailman/testing/testing.cfg +++ b/src/mailman/testing/testing.cfg @@ -22,6 +22,9 @@ #class: mailman.database.postgresql.PostgreSQLDatabase #url: postgres://barry:barry@localhost/mailman +[mailman] +site_owner: noreply@example.com + [mta] smtp_port: 9025 lmtp_port: 9024 @@ -71,10 +74,6 @@ enable: yes base_url: http://go.mail-archive.dev/ recipient: archive@mail-archive.dev -[archiver.pipermail] -enable: yes -base_url: http://www.example.com/pipermail/$listname - [archiver.mhonarc] enable: yes command: /bin/echo "/usr/bin/mhonarc -add -dbfile $PRIVATE_ARCHIVE_FILE_DIR/${listname}.mbox/mhonarc.db -outdir $VAR_DIR/mhonarc/${listname} -stderr $LOG_DIR/mhonarc -stdout $LOG_DIR/mhonarc -spammode -umask 022" |
