def setUp(self): """ Reset database before each test. """ super(ApiDBTestCase, self).setUp() from zou.app.utils import dbhelpers dbhelpers.drop_all() dbhelpers.create_all() self.log_in()
def init_db(): "Creates datababase table (database must be created through PG client)." print("Creating database and tables...") dbhelpers.create_all() print("Database and tables created.")
def reset_db(): "Drop all tables then recreates them." clear_db() dbhelpers.create_all()