Example #1
0
def dropdb():
    """Drop the application DB."""
    confirm = input("Are you sure you want to drop the database? (Y/N) ")
    print("Dropping DB using engine: {}".format(db))
    if confirm.lower() == 'y':
        # with current_app.app_context():
        db.drop_all()
Example #2
0
def dropdb():
    """Drop the application DB."""
    confirm = input("Are you sure you want to drop the database? (Y/N) ")
    print(f"Dropping DB using engine: {db}")
    if confirm.lower() == "y":
        # with current_app.app_context():
        db.drop_all()
Example #3
0
def dropdb():
  """
  Drops the application DB.
  """
  confirm = raw_input("Are you sure you want to drop the database? (Y/N) ")
  print("Dropping DB using engine: {}".format(db))
  if confirm.lower() == 'y':
    # with current_app.app_context():
    db.drop_all()
Example #4
0
 def tearDown(self):
   #self.app.stop_services()
   db.session.remove()
   db.drop_all()
   db.engine.dispose() # ensure we close all db connections
Example #5
0
 def tearDown(self):
     #self.app.stop_services()
     db.session.remove()
     db.drop_all()
     db.engine.dispose()  # ensure we close all db connections