Code

Implemented correct mail splitting (was taking a shortcut). Added unit
[roundup.git] / test / test_mailsplit.py
1 # $Id: test_mailsplit.py,v 1.1 2001-08-03 07:18:22 richard Exp $
3 import unittest, cStringIO
5 from roundup.mailgw import parseContent
7 class MailsplitTestCase(unittest.TestCase):
8     def testPreComment(self):
9         s = '''
10 i will have to think about this later...not a 1.0.4 thing I don't
11 think...too much thought involved!
13 issue_tracker@bizarsoftware.com.au wrote:
14 > Hey, is there a reason why we can't just leave shop_domain and
15 > secure_domain blank and user the REQUEST.whatever_the_machine_name_is
16 > for most users? And then specify that if you're going to have
17 > secure_domain, you've got to have shop_domain too?
18 >
19 > -------
20 > nosy: richard, tejay
21 > ___________________________
22 > Roundup issue tracker
23 > issue_tracker@bizarsoftware.com.au
24 > http://dirk.adroit/cgi-bin/roundup.cgi/issue_tracker/
26 --
27 Terry Kerr (terry@bizarsoftware.com.au)
28 Bizar Software Pty Ltd (www.bizarsoftware.com.au)
29 Phone: +61 3 9563 4461
30 Fax: +61 3 9563 3856
31 ICQ: 79303381
32 '''
33         summary, content = parseContent(s)
34         print '\n====\n', summary
35         print '====', content
36         print '===='
38     def testPostComment(self):
39         s = '''
40 issue_tracker@bizarsoftware.com.au wrote:
41 > Hey, is there a reason why we can't just leave shop_domain and
42 > secure_domain blank and user the REQUEST.whatever_the_machine_name_is
43 > for most users? And then specify that if you're going to have
44 > secure_domain, you've got to have shop_domain too?
45 >
46 > -------
47 > nosy: richard, tejay
48 > ___________________________
49 > Roundup issue tracker
50 > issue_tracker@bizarsoftware.com.au
51 > http://dirk.adroit/cgi-bin/roundup.cgi/issue_tracker/
53 i will have to think about this later...not a 1.0.4 thing I don't
54 think...too much thought involved!
56 --
57 Terry Kerr (terry@bizarsoftware.com.au)
58 Bizar Software Pty Ltd (www.bizarsoftware.com.au)
59 Phone: +61 3 9563 4461
60 Fax: +61 3 9563 3856
61 ICQ: 79303381
62 '''
63         summary, content = parseContent(s)
64         print '\n====\n', summary
65         print '====', content
66         print '===='
68     def testSimple(self):
69         s = '''testing'''
70         summary, content = parseContent(s)
71         print '\n====\n', summary
72         print '====', content
73         print '===='
75     def testEmpty(self):
76         s = ''
77         summary, content = parseContent(s)
78         print '\n====\n', summary
79         print '====', content
80         print '===='
82 def suite():
83    return unittest.makeSuite(MailsplitTestCase, 'test')
86 #
87 # $Log: not supported by cvs2svn $
88 #
89 #
90 # vim: set filetype=python ts=4 sw=4 et si