Mercurial > p > roundup > code
view test/test_memorydb.py @ 5231:8743b7226dc7
Fix issue with retreiving raw template files using the @@file mechanism.
This changes the static_files option in config.ini from supporting a
single directory to support multiple directories. If one of the
directory elements is '-' (i.e. a lone hyphen) the search is stopped
and the TEMPLATES directory is not searched. Since the TEMPLATES
directory is not searched the raw templates aren't accessed.
See: https://sourceforge.net/p/roundup/mailman/message/35773357/
Message subject: showing template sources to all
for details.
Also check in CHANGES.txt that mentions a couple of other small
improvements in the roundup-admin command.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 11 Apr 2017 22:20:13 -0400 |
| parents | 364c54991861 |
| children | 62de601bdf6f |
line wrap: on
line source
import unittest, os, shutil, time from roundup import hyperdb from db_test_base import DBTest, ROTest, SchemaTest, config, setupSchema import memorydb class memorydbOpener: module = memorydb def nuke_database(self): # really kill it self.db = None db = None def open_database(self): if self.db is None: self.db = self.module.Database(config, 'admin') return self.db def setUp(self): self.open_database() setupSchema(self.db, 1, self.module) def tearDown(self): if self.db is not None: self.db.close() # nuke and re-create db for restore def nukeAndCreate(self): self.db.close() self.nuke_database() self.db = self.module.Database(config, 'admin') setupSchema(self.db, 0, self.module) class memorydbDBTest(memorydbOpener, DBTest, unittest.TestCase): pass class memorydbROTest(memorydbOpener, ROTest, unittest.TestCase): def setUp(self): self.db = self.module.Database(config) setupSchema(self.db, 0, self.module) class memorydbSchemaTest(memorydbOpener, SchemaTest, unittest.TestCase): pass from session_common import DBMTest class memorydbSessionTest(memorydbOpener, DBMTest, unittest.TestCase): def setUp(self): self.db = self.module.Database(config, 'admin') setupSchema(self.db, 1, self.module) self.sessions = self.db.sessions # vim: set filetype=python ts=4 sw=4 et si
