comparison test/test_mailgw.py @ 1869:3260268e45d2

Move tests to test_mailsplit, which I hadn't seen before (insert the sound of one hand slapping here).
author Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
date Sat, 25 Oct 2003 12:02:37 +0000
parents cac778217c0c
children f63aa57386b0
comparison
equal deleted inserted replaced
1868:1545a36ae887 1869:3260268e45d2
6 # 6 #
7 # This module is distributed in the hope that it will be useful, 7 # This module is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 # 10 #
11 # $Id: test_mailgw.py,v 1.55 2003-10-24 15:01:11 jlgijsbers Exp $ 11 # $Id: test_mailgw.py,v 1.56 2003-10-25 12:02:36 jlgijsbers Exp $
12 12
13 import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822 13 import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822
14 14
15 from cStringIO import StringIO 15 from cStringIO import StringIO
16 16
992 handler.trapExceptions = 0 992 handler.trapExceptions = 0
993 handler.main(message) 993 handler.main(message)
994 994
995 self.db.user.lookup('johannes') 995 self.db.user.lookup('johannes')
996 996
997
998 class ParseContentTestCase(unittest.TestCase):
999 def testSignatureRemoval(self):
1000 summary, content = parseContent('''Testing, testing.
1001
1002 --
1003 Signature''', 1, 0)
1004 self.assertEqual(content, 'Testing, testing.')
1005
1006 def testKeepMultipleHyphens(self):
1007 body = '''Testing, testing.
1008
1009 ----
1010 Testing, testing.'''
1011 summary, content = parseContent(body, 1, 0)
1012 self.assertEqual(body, content)
1013
1014 def suite(): 997 def suite():
1015 l = [unittest.makeSuite(MailgwTestCase), 998 l = [unittest.makeSuite(MailgwTestCase)]
1016 unittest.makeSuite(ParseContentTestCase)]
1017 return unittest.TestSuite(l) 999 return unittest.TestSuite(l)
1018 1000
1019 1001
1020 # vim: set filetype=python ts=4 sw=4 et si 1002 # vim: set filetype=python ts=4 sw=4 et si

Roundup Issue Tracker: http://roundup-tracker.org/