summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bc7799a)
raw | patch | inline | side by side (parent: bc7799a)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sun, 5 Aug 2001 07:06:25 +0000 (07:06 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sun, 5 Aug 2001 07:06:25 +0000 (07:06 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@208 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/mailgw.py | patch | blob | history | |
test/test_mailsplit.py | patch | blob | history |
diff --git a/roundup/mailgw.py b/roundup/mailgw.py
index 8c181aa27c73f4ba798551afb84a22fd269f22f2..8bf367d40b54e20ac1014ec59e5574abd7737647 100644 (file)
--- a/roundup/mailgw.py
+++ b/roundup/mailgw.py
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 $
'''
# extract out the summary from the message
summary = ''
l = []
- print sections
for section in sections:
section = section.strip()
if not section:
#
# $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 41ab9885f21d34b9b41912e9107d74a1cd6d75ff..87aaebaf74e802e237e0cecc121bc593285f171f 100644 (file)
--- a/test/test_mailsplit.py
+++ b/test/test_mailsplit.py
-# $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
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 = '''
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')
#
# $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.