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()
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()
def tearDown(self): """Tear down the test database.""" db_session.remove() drop_all()