예제 #1
0
    def setup(self):
        os.environ['MODE'] = 'TESTING'

        app = create_app()
        self.app = app

        self.client = app.test_client()

        with app.app_context():
            db.drop_all()
            db.create_all()
예제 #2
0
def createdb():
    """Create database."""
    db.create_all()
예제 #3
0
파일: run.py 프로젝트: ysenarath/tweetkit
def initdb():
    with create_app().app_context() as ctx:
        db.create_all()
    click.echo('Initialized the database')