comparison test/test_mailgw.py @ 1483:ca3e0e2320be

fixes to unit tests
author Richard Jones <richard@users.sourceforge.net>
date Fri, 28 Feb 2003 03:33:25 +0000
parents 8dc60d87ab42
children 9b93d140b8e6
comparison
equal deleted inserted replaced
1480:772b0abb4412 1483:ca3e0e2320be
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.39 2003-02-06 05:43:49 richard Exp $ 11 # $Id: test_mailgw.py,v 1.40 2003-02-28 03:33:25 richard Exp $
12 12
13 import unittest, cStringIO, tempfile, os, shutil, errno, imp, sys, difflib 13 import unittest, cStringIO, tempfile, os, shutil, errno, imp, sys, difflib
14 14
15 # Note: Should parse emails according to RFC2822 instead of performing a 15 # Note: Should parse emails according to RFC2822 instead of performing a
16 # literal string comparision. Parsing the messages allows the tests to work for 16 # literal string comparision. Parsing the messages allows the tests to work for
66 try: 66 try:
67 shutil.rmtree(self.dirname) 67 shutil.rmtree(self.dirname)
68 except OSError, error: 68 except OSError, error:
69 if error.errno not in (errno.ENOENT, errno.ESRCH): raise 69 if error.errno not in (errno.ENOENT, errno.ESRCH): raise
70 # create the instance 70 # create the instance
71 init.install(self.dirname, 'classic', 'anydbm') 71 init.install(self.dirname, 'classic')
72 init.write_select_db(self.dirname, 'anydbm')
72 init.initialise(self.dirname, 'sekrit') 73 init.initialise(self.dirname, 'sekrit')
73 # check we can load the package 74 # check we can load the package
74 self.instance = instance.open(self.dirname) 75 self.instance = instance.open(self.dirname)
75 # and open the database 76 # and open the database
76 self.db = self.instance.open('admin') 77 self.db = self.instance.open('admin')

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