def setUp(self): unittest.TestCase.setUp(self) self.threadpool = FakeThreadPool() self.transactor = Transactor(self.threadpool) main.transactor = self.transactor config.__init__(get_db_file('test.db')) # this call is to create the db file: test.db # the file is than removed in teardown using os.remove() config.main.zstorm.get('main_store')
def tearDown(self): # Free the transaction to avoid having errors that cross # test cases. transaction.manager.free(transaction.get()) # Remove the test database file os.remove(get_db_file('test.db'))