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 setup_with_p(self, p):
     path = self.p.directory
     self.gitdir = dirname(path)
     self.resdir = pathjoin(path, ".git", "results")
     self.mldir = pathjoin(path, ".git")
     self.project_conf = self.p.prosoda_conf
     self.no_report = False
     self.loglevel = "devinfo"
     self.logfile = pathjoin(path, ".git", "log")
     self.recreate = False
     # This config_file is added in the prosoda test command handler
     self.prosoda_conf = self.config_file
     conf = Configuration.load(self.prosoda_conf, self.project_conf)
     dbm = DBManager(conf)
     for table in pid_tables + other_tables:
         dbm.doExecCommit("DELETE FROM {}".format(table))
 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))