Exemple #1
0
 def setUp(self):
     self.app = create_app('testing')
     self.app_context = self.app.app_context()
     self.app_context.push()
     db.create_all()
     # self.client = self.app.test_client(use_cookies=True)
     self.client = self.app.test_client()
Exemple #2
0
 def setUp(self):
     self.app = create_app('testing')
     self.app_context = self.app.app_context()
     self.app_context.push()
     db.create_all()
Exemple #3
0
def db_create(drop_first=True):
    """ Creating database. """
    click.echo('Starting db_create')
    if drop_first:
        db.drop_all()
    db.create_all()