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