def _setup_wiki_db(self): self.wikidb = self._connect_wiki_db() stmts = parse_sql('wiki_test.up.sql') with self.wikidb.cursor() as cursor: for stmt in stmts: cursor.execute(stmt) self.wikidb.commit()
def _cleanup_wiki_db(self): stmts = parse_sql('wiki_test.down.sql') with self.wikidb.cursor() as cursor: for stmt in stmts: cursor.execute(stmt) self.wikidb.commit() self.wikidb.close()