comparison test/test_mailgw.py @ 1887:9d8d5fa0d9ad

Don't rely on being about an issue... ...when submitting a message to the mail gateway.
author Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
date Mon, 03 Nov 2003 18:34:03 +0000
parents f63aa57386b0
children 465dc7dbe67a
comparison
equal deleted inserted replaced
1886:e3cff1bb1b86 1887:9d8d5fa0d9ad
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.57 2003-10-25 22:53:26 richard Exp $ 11 # $Id: test_mailgw.py,v 1.58 2003-11-03 18:34:03 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
995 handler.trapExceptions = 0 995 handler.trapExceptions = 0
996 handler.main(message) 996 handler.main(message)
997 997
998 self.db.user.lookup('johannes') 998 self.db.user.lookup('johannes')
999 999
1000 def testFollowupOnNonIssue(self):
1001 self.db.keyword.create(name='Foo')
1002 message = StringIO('''Content-Type: text/plain;
1003 charset="iso-8859-1"
1004 From: richard <richard@test>
1005 To: issue_tracker@your.tracker.email.domain.example
1006 Message-Id: <followup_dummy_id>
1007 In-Reply-To: <dummy_test_message_id>
1008 Subject: [keyword1] Testing... [name=Bar]
1009
1010 ''')
1011 handler = self.instance.MailGW(self.instance, self.db)
1012 handler.trapExceptions = 0
1013 handler.main(message)
1014
1015 self.assertEqual(self.db.keyword.get('1', 'name'), 'Bar')
1016
1000 def test_suite(): 1017 def test_suite():
1001 suite = unittest.TestSuite() 1018 suite = unittest.TestSuite()
1002 suite.addTest(unittest.makeSuite(MailgwTestCase)) 1019 suite.addTest(unittest.makeSuite(MailgwTestCase))
1003 return suite 1020 return suite
1004 1021

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