Beispiel #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()
Beispiel #2
0
def dropdb():
    with create_app().app_context() as ctx:
        db.drop_all()
    click.echo('Dropped the database')
Beispiel #3
0
 def teardown(self):
     with self.app.app_context():
         db.drop_all()