def tearDown(self):
     with db.cursor() as cur:
         drop_db = "drop database if exists %s" % (app.config["DBNAME"])
         cur.execute(drop_db)
     db.close()
Beispiel #2
0
def teardown_request(exception):
    if exception is not None:
        db.rollback()
    db.close()