Exemplo n.º 1
0
 def setUp(self):
     """ Set up the environnment, ran before every test. """
     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.logger.handlers = []
     APP.logger.setLevel(logging.CRITICAL)
     APP.before_request(FAS._check_session)
Exemplo n.º 2
0
 def setUp(self):
     """ Set up the environnment, ran before every test. """
     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.logger.handlers = []
     APP.logger.setLevel(logging.CRITICAL)
     APP.before_request(FAS._check_session)
Exemplo n.º 3
0
#!/usr/bin/python

# These two lines are needed to run on EL6
__requires__ = ['SQLAlchemy >= 0.7', 'jinja2 >= 2.4']
import pkg_resources

from mirrormanager2 import APP
from mirrormanager2.lib import model

model.create_tables(APP.config['DB_URL'],
                    APP.config.get('PATH_ALEMBIC_INI', None),
                    debug=True)
Exemplo n.º 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 mirrormanager2 import APP
from mirrormanager2.lib import model

model.create_tables(
    APP.config['DB_URL'],
    APP.config.get('PATH_ALEMBIC_INI', None),
    debug=True)