diff options
author | msapiro <> | 2006-03-02 05:04:43 +0000 |
---|---|---|
committer | msapiro <> | 2006-03-02 05:04:43 +0000 |
commit | 9bfc9817472a875ac832c59b3b8907f1bd4afbd5 (patch) | |
tree | 000564c16a4aa77fd527540ca13b3a08fa5a7738 | |
parent | 2f940a523ff299df85e6df9fe7fb74c23eb0eb21 (diff) | |
download | mailman2-9bfc9817472a875ac832c59b3b8907f1bd4afbd5.tar.gz mailman2-9bfc9817472a875ac832c59b3b8907f1bd4afbd5.tar.xz mailman2-9bfc9817472a875ac832c59b3b8907f1bd4afbd5.zip |
Added new test bounces to test_bounces.py. Modified logic for "Stop" return.
Deleted 3 wrongly named test bounce files and added with correct names.
-rw-r--r-- | tests/test_bounces.py | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/tests/test_bounces.py b/tests/test_bounces.py index 2ad1cd8f..9b09b5a6 100644 --- a/tests/test_bounces.py +++ b/tests/test_bounces.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001,2002 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2006 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -12,7 +12,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. """Test the bounce detection modules.""" @@ -21,6 +22,8 @@ import os import unittest import email +from Mailman.Bouncers.BouncerAPI import Stop + class BounceTest(unittest.TestCase): @@ -40,6 +43,10 @@ class BounceTest(unittest.TestCase): ('SimpleMatch', 'simple_04.txt', ['claird@starbase.neosoft.com']), ('SimpleMatch', 'newmailru_01.txt', ['zzzzz@newmail.ru']), ('SimpleMatch', 'hotpop_01.txt', ['allensmithee@hotpop.com']), + ('SimpleMatch', 'microsoft_03.txt', ['midica@banknbr.com']), + ('SimpleMatch', 'simple_05.txt', ['rlosardo@sbcglobal.net']), + ('SimpleMatch', 'simple_06.txt', ['dlyle@hamiltonpacific.com']), + ('SimpleMatch', 'simple_07.txt', ['william.xxxx@sbcglobal.net']), # SimpleWarning ('SimpleWarning', 'simple_03.txt', ['jacobus@geo.co.za']), # GroupWise @@ -56,13 +63,14 @@ class BounceTest(unittest.TestCase): ('DSN', 'dsn_02.txt', ['zzzzz@zeus.hud.ac.uk']), ('DSN', 'dsn_03.txt', ['ddd.kkk@advalvas.be']), ('DSN', 'dsn_04.txt', ['max.haas@unibas.ch']), - ('DSN', 'dsn_05.txt', ['pkocmid@atlas.cz']), - ('DSN', 'dsn_06.txt', ['hao-nghi.au@fr.thalesgroup.com']), - ('DSN', 'dsn_07.txt', ['david.farrar@parliament.govt.nz']), - ('DSN', 'dsn_08.txt', ['news-list.zope@localhost.bln.innominate.de']), + ('DSN', 'dsn_05.txt', Stop), + ('DSN', 'dsn_06.txt', Stop), + ('DSN', 'dsn_07.txt', Stop), + ('DSN', 'dsn_08.txt', Stop), ('DSN', 'dsn_09.txt', ['pr@allen-heath.com']), ('DSN', 'dsn_10.txt', ['anne.person@dom.ain']), ('DSN', 'dsn_11.txt', ['joem@example.com']), + ('DSN', 'dsn_12.txt', ['auaauqdgrdz@jtc-con.co.jp']), # Microsoft Exchange ('Exchange', 'microsoft_01.txt', ['DJBENNETT@IKON.COM']), ('Exchange', 'microsoft_02.txt', ['MDMOORE@BALL.COM']), @@ -70,8 +78,13 @@ class BounceTest(unittest.TestCase): ('SMTP32', 'smtp32_01.txt', ['oliver@pcworld.com.ph']), ('SMTP32', 'smtp32_02.txt', ['lists@mail.spicynoodles.com']), ('SMTP32', 'smtp32_03.txt', ['borisk@gw.xraymedia.com']), + ('SMTP32', 'smtp32_04.txt', ['after_another@pacbell.net', + 'one_bad_address@pacbell.net']), + ('SMTP32', 'smtp32_05.txt', ['jmrpowersports@jmrpowersports.com']), + ('SMTP32', 'smtp32_06.txt', ['Absolute_garbage_addr@pacbell.net']), # Qmail ('Qmail', 'qmail_01.txt', ['psadisc@wwwmail.n-h.de']), + ('Qmail', 'qmail_02.txt', ['rauschlo@frontfin.com']), # LLNL's custom Sendmail ('LLNL', 'llnl_01.txt', ['trotts1@llnl.gov']), # Netscape's server... @@ -101,6 +114,9 @@ class BounceTest(unittest.TestCase): 'yuli_kolesnikov@yahoo.com']), ('Yahoo', 'yahoo_09.txt', ['hankel_o_fung@yahoo.com', 'ultravirus2001@yahoo.com']), + ('Yahoo', 'yahoo_10.txt', ['jajcchoo@yahoo.com', + 'lyons94706@yahoo.com', + 'turtle4jne@yahoo.com']), # sina.com appears to use their own weird SINAEMAIL MTA ('Sina', 'sina_01.txt', ['boboman76@sina.com', 'alan_t18@sina.com']), # No address can be detected in these... @@ -121,8 +137,10 @@ class BounceTest(unittest.TestCase): # Some modules return None instead of [] for failure if foundaddrs is None: foundaddrs = [] - addrs.sort() - foundaddrs.sort() + if foundaddrs is not Stop: + foundaddrs = [found.strip() for found in foundaddrs] + addrs.sort() + foundaddrs.sort() self.assertEqual(addrs, foundaddrs) def test_SMTP32_failure(self): |