def setUp(self): """ Set up the environnment, ran before every tests. """ if '///' in DB_PATH: dbfile = DB_PATH.split('///')[1] if os.path.exists(dbfile): os.unlink(dbfile) self.session = model.create_tables(DB_PATH, debug=False) APP.before_request(FAS._check_session)
def setUp(self): """ Set up the environnment, ran before every tests. """ self.session = model.create_tables(DB_PATH, debug=False)
#!/usr/bin/python ## These two lines are needed to run on EL6 __requires__ = ['SQLAlchemy >= 0.7', 'jinja2 >= 2.4'] import pkg_resources from pkgdb import APP from pkgdb.lib import model path_alembic = None if 'PATH_ALEMBIC_INI' in APP.config \ and APP.config['PATH_ALEMBIC_INI']: path_alembic = APP.config['PATH_ALEMBIC_INI'] model.create_tables(APP.config['DB_URL'], path_alembic, True)