def setUp(self): self.app = create_app("default") self.mail = Mail() self.mail.init_app(self.app) self.app_context = self.app.app_context() self.app_context.push()
from flask_script import Manager from flask_migrate import MigrateCommand from betronic import create_app app = create_app() manager = Manager(app) manager.add_command('db', MigrateCommand) if __name__ == '__main__': manager.run()
def setUp(self): self.app = create_app("testing") self.app_context = self.app.app_context() self.app_context.push() db.create_all()