예제 #1
0
파일: __init__.py 프로젝트: aavrug/nuancier
 def setUp(self):
     """ Set up the environnment, ran before every tests. """
     self.session = model.create_tables(DB_PATH, debug=False)
예제 #2
0
 def setUp(self):
     """ Set up the environnment, ran before every tests. """
     self.session = model.create_tables(DB_PATH, debug=False)
예제 #3
0
파일: createdb.py 프로젝트: xsuchy/nuancier
#!/usr/bin/env python

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

from nuancier import APP
from nuancier.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)