comparison test/test_mailgw.py @ 532:a69dc91643e9

removed file writing from tests.
author Richard Jones <richard@users.sourceforge.net>
date Mon, 14 Jan 2002 07:12:15 +0000
parents dce4c75bef5a
children ad6dbc21a570
comparison
equal deleted inserted replaced
531:32c1dd156605 532:a69dc91643e9
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.3 2002-01-14 02:20:15 richard Exp $ 11 # $Id: test_mailgw.py,v 1.4 2002-01-14 07:12:15 richard Exp $
12 12
13 import unittest, cStringIO, tempfile, os, shutil, errno, imp, sys 13 import unittest, cStringIO, tempfile, os, shutil, errno, imp, sys
14 14
15 from roundup.mailgw import MailGW 15 from roundup.mailgw import MailGW
16 from roundup import init, instance 16 from roundup import init, instance
150 This is a second followup 150 This is a second followup
151 ''') 151 ''')
152 handler = self.instance.MailGW(self.instance, self.db) 152 handler = self.instance.MailGW(self.instance, self.db)
153 # TODO: fix the damn config - this is apalling 153 # TODO: fix the damn config - this is apalling
154 handler.main(message) 154 handler.main(message)
155 fname = 'fw2_%s.output'%self.count
156 open(fname,"w").write(open(os.environ['SENDMAILDEBUG']).read())
157 self.assertEqual(open(os.environ['SENDMAILDEBUG']).read(), 155 self.assertEqual(open(os.environ['SENDMAILDEBUG']).read(),
158 '''FROM: roundup-admin@fill.me.in. 156 '''FROM: roundup-admin@fill.me.in.
159 TO: chef@bork.bork.bork, richard@test 157 TO: chef@bork.bork.bork, richard@test
160 Content-Type: text/plain 158 Content-Type: text/plain
161 Subject: [issue1] Testing... 159 Subject: [issue1] Testing...
186 return unittest.TestSuite(l) 184 return unittest.TestSuite(l)
187 185
188 186
189 # 187 #
190 # $Log: not supported by cvs2svn $ 188 # $Log: not supported by cvs2svn $
189 # Revision 1.3 2002/01/14 02:20:15 richard
190 # . changed all config accesses so they access either the instance or the
191 # config attriubute on the db. This means that all config is obtained from
192 # instance_config instead of the mish-mash of classes. This will make
193 # switching to a ConfigParser setup easier too, I hope.
194 #
195 # At a minimum, this makes migration a _little_ easier (a lot easier in the
196 # 0.5.0 switch, I hope!)
197 #
191 # Revision 1.2 2002/01/11 23:22:29 richard 198 # Revision 1.2 2002/01/11 23:22:29 richard
192 # . #502437 ] rogue reactor and unittest 199 # . #502437 ] rogue reactor and unittest
193 # in short, the nosy reactor was modifying the nosy list. That code had 200 # in short, the nosy reactor was modifying the nosy list. That code had
194 # been there for a long time, and I suspsect it was there because we 201 # been there for a long time, and I suspsect it was there because we
195 # weren't generating the nosy list correctly in other places of the code. 202 # weren't generating the nosy list correctly in other places of the code.

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