Exemple #1
0
 def run(self):
     """Drop all tables after user ha verified."""
     verified = prompt_bool(
         'Do you really want to drop all the database tables?')
     if verified:
         sys.stdout.write('All tables dropped. Database is now empty.\n')
         drop_all()
Exemple #2
0
 def run(self):
     """Drop all tables after user ha verified."""
     verified = prompt_bool(
         'Do you really want to drop all the database tables?')
     if verified:
         sys.stdout.write('All tables dropped. Database is now empty.\n')
         drop_all()
Exemple #3
0
def drop_db():
    """Drop all database tables."""
    if click.confirm("Do you really want to drop all the database tables?"):
        if click.confirm(
                "Are you REALLLY sure you want to DROP ALL the database tables?"
        ):
            print("All tables dropped. Database is now empty.")
            drop_all()
Exemple #4
0
 def tearDown(self):
     """Tear down the test database."""
     db_session.remove()
     drop_all()
Exemple #5
0
 def tearDown(self):
     """Tear down the test database."""
     db_session.remove()
     drop_all()