Mercurial > p > roundup > code
comparison test/test_mailsplit.py @ 1822:7e32c7663781
added test to confirm behaviour of summary generation from quoted-only email
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 30 Sep 2003 23:55:54 +0000 |
| parents | bf8b2380adb3 |
| children | 3260268e45d2 |
comparison
equal
deleted
inserted
replaced
| 1819:e24cebaaa7e8 | 1822:7e32c7663781 |
|---|---|
| 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.12 2002-10-18 03:34:58 richard Exp $ | 18 # $Id: test_mailsplit.py,v 1.13 2003-09-30 23:55:54 richard 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 |
| 165 -- | 165 -- |
| 166 blah blah blah signature | 166 blah blah blah signature |
| 167 userfoo@foo.com | 167 userfoo@foo.com |
| 168 ''') | 168 ''') |
| 169 | 169 |
| 170 def testAllQuoted(self): | |
| 171 s = '\nissue_tracker@foo.com wrote:\n> testing\n' | |
| 172 summary, content = parseContent(s, 0, 1) | |
| 173 self.assertEqual(summary, '') | |
| 174 self.assertEqual(content, s) | |
| 170 | 175 |
| 171 def testSimple(self): | 176 def testSimple(self): |
| 172 s = '''testing''' | 177 s = '''testing''' |
| 173 summary, content = parseContent(s, 0, 0) | 178 summary, content = parseContent(s, 0, 0) |
| 174 self.assertEqual(summary, 'testing') | 179 self.assertEqual(summary, 'testing') |
