Beispiel #1
0
    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()
Beispiel #2
0
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.")
Beispiel #3
0
def reset_db():
    "Drop all tables then recreates them."

    clear_db()
    dbhelpers.create_all()