diff --git a/test/test_mailgw.py b/test/test_mailgw.py
index 622f965422c1893e6fd239fc089976c0d33b4cce..e8325bc5a89fdd071b412cb05ef3e1d4e5ecd39b 100644 (file)
--- a/test/test_mailgw.py
+++ b/test/test_mailgw.py
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: test_mailgw.py,v 1.21 2002-06-18 03:59:59 dman13 Exp $
+# $Id: test_mailgw.py,v 1.23 2002-07-14 02:02:43 richard Exp $
import unittest, cStringIO, tempfile, os, shutil, errno, imp, sys, difflib
This is a test submission of a new issue.
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
nodeid = handler.main(message)
if os.path.exists(os.environ['SENDMAILDEBUG']):
error = open(os.environ['SENDMAILDEBUG']).read()
This is a test submission of a new issue.
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
nodeid = handler.main(message)
if os.path.exists(os.environ['SENDMAILDEBUG']):
error = open(os.environ['SENDMAILDEBUG']).read()
''')
userlist = self.db.user.list()
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
if os.path.exists(os.environ['SENDMAILDEBUG']):
error = open(os.environ['SENDMAILDEBUG']).read()
This is a test submission of a new issue.
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
if os.path.exists(os.environ['SENDMAILDEBUG']):
error = open(os.environ['SENDMAILDEBUG']).read()
This is a test submission of a new issue.
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
# TODO: fix the damn config - this is apalling
self.db.config.MESSAGES_TO_AUTHOR = 'yes'
handler.main(message)
This is a second followup
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
self.compareStrings(open(os.environ['SENDMAILDEBUG']).read(),
'''FROM: roundup-admin@your.tracker.email.domain.example
To: issue_tracker@your.tracker.email.domain.example
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
-Subject: [issue1] Testing... [assignedto=mary; nosy=john]
+Subject: [issue1] Testing... [assignedto=mary; nosy=+john]
This is a followup
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
l = self.db.issue.get('1', 'nosy')
l.sort()
To: issue_tracker@your.tracker.email.domain.example
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
-Subject: Re: Testing... [assignedto=mary; nosy=john]
+Subject: Re: Testing... [assignedto=mary; nosy=+john]
This is a followup
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
self.compareStrings(open(os.environ['SENDMAILDEBUG']).read(),
This is a followup
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
self.compareStrings(open(os.environ['SENDMAILDEBUG']).read(),
This is a followup
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
self.compareStrings(open(os.environ['SENDMAILDEBUG']).read(),
This is a followup
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
self.compareStrings(open(os.environ['SENDMAILDEBUG']).read(),
This is a followup
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
self.compareStrings(open(os.environ['SENDMAILDEBUG']).read(),
This is a followup
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
self.compareStrings(open(os.environ['SENDMAILDEBUG']).read(),
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
l = self.db.issue.get('1', 'nosy')
l.sort()
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
self.compareStrings(open(os.environ['SENDMAILDEBUG']).read(),
'''FROM: roundup-admin@your.tracker.email.domain.example
''')
handler = self.instance.MailGW(self.instance, self.db)
+ handler.trapExceptions = 0
handler.main(message)
self.compareStrings(open(os.environ['SENDMAILDEBUG']).read(),
'''FROM: roundup-admin@your.tracker.email.domain.example
#
# $Log: not supported by cvs2svn $
+# Revision 1.22 2002/07/09 01:21:24 richard
+# Added ability for unit tests to turn off exception handling in mailgw so
+# that exceptions are reported earlier (and hence make sense).
+#
+# Revision 1.21 2002/06/18 03:59:59 dman13
+# Updated message strings to match the RFC822 address quoting performed
+# by the 'email' and 'rfc822' modules. The verification really should
+# use a RFC2822 message parser rather than literal string comparisions
+# to allow for legal variations in messages.
+#
# Revision 1.20 2002/05/29 01:16:17 richard
# Sorry about this huge checkin! It's fixing a lot of related stuff in one go
# though.