88# but WITHOUT ANY WARRANTY; without even the implied warranty of
99# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1010#
11- # $Id: test_mailgw.py,v 1.21 2002-06-18 03:59:59 dman13 Exp $
11+ # $Id: test_mailgw.py,v 1.22 2002-07-09 01:21:24 richard Exp $
1212
1313import unittest , cStringIO , tempfile , os , shutil , errno , imp , sys , difflib
1414
@@ -106,6 +106,7 @@ def doNewIssue(self):
106106This is a test submission of a new issue.
107107''' )
108108 handler = self .instance .MailGW (self .instance , self .db )
109+ handler .trapExceptions = 0
109110 nodeid = handler .main (message )
110111 if os .path .exists (os .environ ['SENDMAILDEBUG' ]):
111112 error = open (os .environ ['SENDMAILDEBUG' ]).read ()
@@ -130,6 +131,7 @@ def testNewIssueNosy(self):
130131This is a test submission of a new issue.
131132''' )
132133 handler = self .instance .MailGW (self .instance , self .db )
134+ handler .trapExceptions = 0
133135 nodeid = handler .main (message )
134136 if os .path .exists (os .environ ['SENDMAILDEBUG' ]):
135137 error = open (os .environ ['SENDMAILDEBUG' ]).read ()
@@ -150,6 +152,7 @@ def testAlternateAddress(self):
150152''' )
151153 userlist = self .db .user .list ()
152154 handler = self .instance .MailGW (self .instance , self .db )
155+ handler .trapExceptions = 0
153156 handler .main (message )
154157 if os .path .exists (os .environ ['SENDMAILDEBUG' ]):
155158 error = open (os .environ ['SENDMAILDEBUG' ]).read ()
@@ -169,6 +172,7 @@ def testNewIssueNoClass(self):
169172This is a test submission of a new issue.
170173''' )
171174 handler = self .instance .MailGW (self .instance , self .db )
175+ handler .trapExceptions = 0
172176 handler .main (message )
173177 if os .path .exists (os .environ ['SENDMAILDEBUG' ]):
174178 error = open (os .environ ['SENDMAILDEBUG' ]).read ()
@@ -185,6 +189,7 @@ def testNewIssueAuthMsg(self):
185189This is a test submission of a new issue.
186190''' )
187191 handler = self .instance .MailGW (self .instance , self .db )
192+ handler .trapExceptions = 0
188193 # TODO: fix the damn config - this is apalling
189194 self .db .config .MESSAGES_TO_AUTHOR = 'yes'
190195 handler .main (message )
@@ -242,6 +247,7 @@ def testSimpleFollowup(self):
242247This is a second followup
243248''' )
244249 handler = self .instance .MailGW (self .instance , self .db )
250+ handler .trapExceptions = 0
245251 handler .main (message )
246252 self .compareStrings (open (os .environ ['SENDMAILDEBUG' ]).read (),
247253@@ -285,6 +291,7 @@ def testFollowup(self):
285291This is a followup
286292''' )
287293 handler = self .instance .MailGW (self .instance , self .db )
294+ handler .trapExceptions = 0
288295 handler .main (message )
289296 l = self .db .issue .get ('1' , 'nosy' )
290297 l .sort ()
@@ -333,6 +340,7 @@ def testFollowupTitleMatch(self):
333340This is a followup
334341''' )
335342 handler = self .instance .MailGW (self .instance , self .db )
343+ handler .trapExceptions = 0
336344 handler .main (message )
337345
338346 self .compareStrings (open (os .environ ['SENDMAILDEBUG' ]).read (),
@@ -379,6 +387,7 @@ def testFollowupNosyAuthor(self):
379387This is a followup
380388''' )
381389 handler = self .instance .MailGW (self .instance , self .db )
390+ handler .trapExceptions = 0
382391 handler .main (message )
383392
384393 self .compareStrings (open (os .environ ['SENDMAILDEBUG' ]).read (),
@@ -426,6 +435,7 @@ def testFollowupNosyRecipients(self):
426435This is a followup
427436''' )
428437 handler = self .instance .MailGW (self .instance , self .db )
438+ handler .trapExceptions = 0
429439 handler .main (message )
430440
431441 self .compareStrings (open (os .environ ['SENDMAILDEBUG' ]).read (),
@@ -473,6 +483,7 @@ def testFollowupNosyAuthorAndCopy(self):
473483This is a followup
474484''' )
475485 handler = self .instance .MailGW (self .instance , self .db )
486+ handler .trapExceptions = 0
476487 handler .main (message )
477488
478489 self .compareStrings (open (os .environ ['SENDMAILDEBUG' ]).read (),
@@ -519,6 +530,7 @@ def testFollowupNoNosyAuthor(self):
519530This is a followup
520531''' )
521532 handler = self .instance .MailGW (self .instance , self .db )
533+ handler .trapExceptions = 0
522534 handler .main (message )
523535
524536 self .compareStrings (open (os .environ ['SENDMAILDEBUG' ]).read (),
@@ -565,6 +577,7 @@ def testFollowupNoNosyRecipients(self):
565577This is a followup
566578''' )
567579 handler = self .instance .MailGW (self .instance , self .db )
580+ handler .trapExceptions = 0
568581 handler .main (message )
569582
570583 self .compareStrings (open (os .environ ['SENDMAILDEBUG' ]).read (),
@@ -609,6 +622,7 @@ def testNosyRemove(self):
609622
610623''' )
611624 handler = self .instance .MailGW (self .instance , self .db )
625+ handler .trapExceptions = 0
612626 handler .main (message )
613627 l = self .db .issue .get ('1' , 'nosy' )
614628 l .sort ()
@@ -634,6 +648,7 @@ def testEnc01(self):
634648
635649''' )
636650 handler = self .instance .MailGW (self .instance , self .db )
651+ handler .trapExceptions = 0
637652 handler .main (message )
638653 self .compareStrings (open (os .environ ['SENDMAILDEBUG' ]).read (),
639654@@ -687,6 +702,7 @@ def testMultipartEnc01(self):
687702
688703''' )
689704 handler = self .instance .MailGW (self .instance , self .db )
705+ handler .trapExceptions = 0
690706 handler .main (message )
691707 self .compareStrings (open (os .environ ['SENDMAILDEBUG' ]).read (),
692708@@ -727,6 +743,12 @@ def suite():
727743
728744#
729745# $Log: not supported by cvs2svn $
746+ # Revision 1.21 2002/06/18 03:59:59 dman13
747+ # Updated message strings to match the RFC822 address quoting performed
748+ # by the 'email' and 'rfc822' modules. The verification really should
749+ # use a RFC2822 message parser rather than literal string comparisions
750+ # to allow for legal variations in messages.
751+ #
730752# Revision 1.20 2002/05/29 01:16:17 richard
731753# Sorry about this huge checkin! It's fixing a lot of related stuff in one go
732754# though.
0 commit comments