예제 #1
0
 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)
예제 #2
0
 def setUp(self):
     """ Set up the environnment, ran before every tests. """
     self.session = model.create_tables(DB_PATH, debug=False)
예제 #3
0
 def setUp(self):
     """ Set up the environnment, ran before every tests. """
     self.session = model.create_tables(DB_PATH, debug=False)
예제 #4
0
#!/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)