def getResults(self): conf = Configuration.load(self.prosoda_conf, self.project_conf) dbm = DBManager(conf) project_id = dbm.getProjectID(conf["project"], self.tagging) self.assertGreaterEqual(project_id, 0) results = {} for table in pid_tables + other_tables + ignore_tables: dbm.doExec("SELECT * FROM {table}".format(table=table)) results[table] = dbm.doFetchAll() return results
def checkClean(self): conf = Configuration.load(self.prosoda_conf, self.project_conf) dbm = DBManager(conf) project_id = dbm.getProjectID(conf["project"], self.tagging) dbm.doExecCommit("DELETE FROM project WHERE id={}".format(project_id)) for table in pid_tables: res = dbm.doExec("SELECT * FROM {table} WHERE projectId={pid}". format(table=table, pid=project_id)) self.assertEqual(res, 0, msg="Table '{}' still dirty!". format(table)) for table in other_tables: res = dbm.doExec("SELECT * FROM {table}".format(table=table)) self.assertEqual(res, 0, msg="Table '{}' still dirty!".format(table))