comparison test/test_mailsplit.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 7e32c7663781
children f63aa57386b0
comparison
equal deleted inserted replaced
1868:1545a36ae887 1869:3260268e45d2
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: test_mailsplit.py,v 1.13 2003-09-30 23:55:54 richard Exp $ 18 # $Id: test_mailsplit.py,v 1.14 2003-10-25 12:02:37 jlgijsbers Exp $
19 19
20 import unittest, cStringIO 20 import unittest, cStringIO
21 21
22 from roundup.mailgw import parseContent 22 from roundup.mailgw import parseContent
23 23
217 s = 'This is a long sentence that would normally\nbe split. More words.' 217 s = 'This is a long sentence that would normally\nbe split. More words.'
218 summary, content = parseContent(s, 0, 0) 218 summary, content = parseContent(s, 0, 0)
219 self.assertEqual(summary, 'This is a long sentence that would ' 219 self.assertEqual(summary, 'This is a long sentence that would '
220 'normally\nbe split.') 220 'normally\nbe split.')
221 221
222 def testKeepMultipleHyphens(self):
223 body = '''Testing, testing.
224
225 ----
226 Testing, testing.'''
227 summary, content = parseContent(body, 1, 0)
228 self.assertEqual(body, content)
229
222 def suite(): 230 def suite():
223 return unittest.makeSuite(MailsplitTestCase, 'test') 231 return unittest.makeSuite(MailsplitTestCase, 'test')
224 232
225 233
226 # vim: set filetype=python ts=4 sw=4 et si 234 # vim: set filetype=python ts=4 sw=4 et si

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