comparison test/test_mailgw.py @ 3173:f412ae175b4d maint-0.8

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Mon, 14 Feb 2005 05:56:00 +0000
parents f0b887a5e47b
children 246fed02a51e
comparison
equal deleted inserted replaced
3170:08dbdc4b3e6c 3173:f412ae175b4d
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.73 2004-10-24 10:01:58 a1s Exp $ 11 # $Id: test_mailgw.py,v 1.73.2.1 2005-02-14 05:55:20 richard Exp $
12 12
13 # TODO: test bcc 13 # TODO: test bcc
14 14
15 import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822 15 import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822
16 16
977 l = self.db.issue.get(nodeid, 'nosy') 977 l = self.db.issue.get(nodeid, 'nosy')
978 l.sort() 978 l.sort()
979 self.assertEqual(l, [self.richard_id, self.mary_id]) 979 self.assertEqual(l, [self.richard_id, self.mary_id])
980 return nodeid 980 return nodeid
981 981
982
983 def testDejaVu(self): 982 def testDejaVu(self):
984 self.assertRaises(IgnoreLoop, self._handle_mail, 983 self.assertRaises(IgnoreLoop, self._handle_mail,
985 '''Content-Type: text/plain; 984 '''Content-Type: text/plain;
986 charset="iso-8859-1" 985 charset="iso-8859-1"
987 From: Chef <chef@bork.bork.bork> 986 From: Chef <chef@bork.bork.bork>
1004 Cc: richard@test 1003 Cc: richard@test
1005 Message-Id: <dummy_test_message_id> 1004 Message-Id: <dummy_test_message_id>
1006 Subject: Re: [issue] Testing... 1005 Subject: Re: [issue] Testing...
1007 1006
1008 Hi, I'm on holidays, and this is a dumb auto-responder. 1007 Hi, I'm on holidays, and this is a dumb auto-responder.
1008 ''')
1009
1010 def testAutoReplyEmailsAreIgnored(self):
1011 self.assertRaises(IgnoreBulk, self._handle_mail,
1012 '''Content-Type: text/plain;
1013 charset="iso-8859-1"
1014 From: Chef <chef@bork.bork.bork>
1015 To: issue_tracker@your.tracker.email.domain.example
1016 Cc: richard@test
1017 Message-Id: <dummy_test_message_id>
1018 Subject: Re: [issue] Out of office AutoReply: Back next week
1019
1020 Hi, I'm back in the office next week
1009 ''') 1021 ''')
1010 1022
1011 def test_suite(): 1023 def test_suite():
1012 suite = unittest.TestSuite() 1024 suite = unittest.TestSuite()
1013 suite.addTest(unittest.makeSuite(MailgwTestCase)) 1025 suite.addTest(unittest.makeSuite(MailgwTestCase))

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