From: richard Date: Sun, 5 Aug 2001 07:06:25 +0000 (+0000) Subject: removed some print statements X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3327e45d518c141d93cfd363269f5fb8a996a287;p=roundup.git removed some print statements git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@208 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/mailgw.py b/roundup/mailgw.py index 8c181aa..8bf367d 100644 --- a/roundup/mailgw.py +++ b/roundup/mailgw.py @@ -55,7 +55,7 @@ are calling the create() method to create a new node). If an auditor raises an exception, the original message is bounced back to the sender with the explanatory message given in the exception. -$Id: mailgw.py,v 1.7 2001-08-03 07:18:22 richard Exp $ +$Id: mailgw.py,v 1.8 2001-08-05 07:06:07 richard Exp $ ''' @@ -297,7 +297,6 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'), # extract out the summary from the message summary = '' l = [] - print sections for section in sections: section = section.strip() if not section: @@ -318,6 +317,10 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'), # # $Log: not supported by cvs2svn $ +# Revision 1.7 2001/08/03 07:18:22 richard +# Implemented correct mail splitting (was taking a shortcut). Added unit +# tests. Also snips signatures now too. +# # Revision 1.6 2001/08/01 04:24:21 richard # mailgw was assuming certain properties existed on the issues being created. # diff --git a/test/test_mailsplit.py b/test/test_mailsplit.py index 41ab988..87aaeba 100644 --- a/test/test_mailsplit.py +++ b/test/test_mailsplit.py @@ -1,4 +1,4 @@ -# $Id: test_mailsplit.py,v 1.2 2001-08-03 07:23:09 richard Exp $ +# $Id: test_mailsplit.py,v 1.3 2001-08-05 07:06:25 richard Exp $ import unittest, cStringIO @@ -28,9 +28,8 @@ blah blah blah signature userfoo@foo.com ''' summary, content = parseContent(s) - print '\n====\n', summary - print '====', content - print '====' + self.assertEqual(summary, 'blah blah blah blah... blah blah? blah blah blah blah blah. blah blah blah') + self.assertEqual(content, 'blah blah blah blah... blah blah? blah blah blah blah blah. blah blah blah\nblah blah blah blah blah blah blah blah blah blah blah!') def testPostComment(self): s = ''' @@ -58,23 +57,20 @@ blah blah blah signature userfoo@foo.com ''' summary, content = parseContent(s) - print '\n====\n', summary - print '====', content - print '====' + self.assertEqual(summary, 'blah blah blah blah... blah blah? blah blah blah blah blah. blah blah blah') + self.assertEqual(content, 'blah blah blah blah... blah blah? blah blah blah blah blah. blah blah blah\nblah blah blah blah blah blah blah blah blah blah blah!') def testSimple(self): s = '''testing''' summary, content = parseContent(s) - print '\n====\n', summary - print '====', content - print '====' + self.assertEqual(summary, 'testing') + self.assertEqual(content, 'testing') def testEmpty(self): s = '' summary, content = parseContent(s) - print '\n====\n', summary - print '====', content - print '====' + self.assertEqual(summary, '') + self.assertEqual(content, '') def suite(): return unittest.makeSuite(MailsplitTestCase, 'test') @@ -82,6 +78,9 @@ def suite(): # # $Log: not supported by cvs2svn $ +# Revision 1.2 2001/08/03 07:23:09 richard +# er, removed the innocent from the the code :) +# # Revision 1.1 2001/08/03 07:18:22 richard # Implemented correct mail splitting (was taking a shortcut). Added unit # tests. Also snips signatures now too.