comparison test/test_mailgw.py @ 6365:7f00fc5958ca

Make memorydb persistent across re-open This allows memorydb to be used for more tests, in particular re-opening with another user for checking permissions.
author Ralf Schlatterbeck <rsc@runtux.com>
date Wed, 31 Mar 2021 12:49:28 +0200
parents 58817c3bf471
children 2453d7b58a92
comparison
equal deleted inserted replaced
6364:e8361bce72de 6365:7f00fc5958ca
221 def tearDown(self): 221 def tearDown(self):
222 roundupdb._ = mailgw._ = self.old_translate_ 222 roundupdb._ = mailgw._ = self.old_translate_
223 if os.path.exists(SENDMAILDEBUG): 223 if os.path.exists(SENDMAILDEBUG):
224 os.remove(SENDMAILDEBUG) 224 os.remove(SENDMAILDEBUG)
225 self.db.close() 225 self.db.close()
226 memorydb.db_nuke('')
226 227
227 def _allowAnonymousSubmit(self): 228 def _allowAnonymousSubmit(self):
228 p = [ 229 p = [
229 self.db.security.getPermission('Register', 'user'), 230 self.db.security.getPermission('Register', 'user'),
230 self.db.security.getPermission('Email Access', None), 231 self.db.security.getPermission('Email Access', None),

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