def setUp(self): self.app = create_app('testing') self.app_context = self.app.app_context() self.app_context.push() db.create_all() Role.insert_roles() self.client = self.app.test_client(use_cookies=True)
def setUp(self): self.app = create_app('testing') self.app_context = self.app.app_context() self.app_context.push() db.create_all() Role.insert_roles()
def setUp(self): self.app = create_app('testing') self.app_context = self.app.app_context() self.app_context.push() db.create_all()
deps_paths = [ path.join(path.split(path.realpath(__file__))[0], 'deps'), path.join(path.split(path.realpath(__file__))[0], 'mydeps'), ] for deps_path in deps_paths: if deps_path not in sys.path: sys.path.insert(0, deps_path) from wtxlog import create_app, db, get_appconfig from flask.ext.script import Manager from flask.ext.migrate import Migrate, MigrateCommand # bae, sae, production, local(default) app = create_app(os.getenv('APP_CONFIG') or str(get_appconfig()) or 'default') manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', MigrateCommand) @manager.command def deploy(): """Run deployment tasks.""" from flask.ext.migrate import upgrade from wtxlog.models import Role, User upgrade() #db.create_all()
def setUp(self): self.app = create_app("testing") self.app_context = self.app.app_context() self.app_context.push() db.create_all() Role.insert_roles()
for deps_path in deps_paths: if deps_path not in sys.path: sys.path.insert(0, deps_path) COV = None if os.environ.get('FLASK_COVERAGE'): import coverage COV = coverage.coverage(branch=True, include='wtxlog/*') COV.start() from wtxlog import create_app, db, get_appconfig from flask.ext.script import Manager from flask.ext.migrate import Migrate, MigrateCommand # bae, sae, production, local(default) app = create_app(os.getenv('APP_CONFIG') or str(get_appconfig()) or 'default') manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', MigrateCommand) @manager.command def deploy(): """Run deployment tasks.""" from flask.ext.migrate import upgrade from wtxlog.models import Role upgrade() # db.create_all()