def setUp(self, _poll): _poll.return_value = self.DATA # def __init__(self, url, build ): self.b = mock.MagicMock() # Build object self.b.__str__.return_value = 'FooBuild' self.rs = ResultSet('http://', self.b)
def get_resultset(self): """ Obtain detailed results for this build. """ result_url = self.get_result_url() if self.STR_TOTALCOUNT not in self.get_actions(): raise NoResults("%s does not have any published results" % str(self)) buildstatus = self.get_status() if not self.get_actions()[self.STR_TOTALCOUNT]: raise NoResults(self.STR_TPL_NOTESTS_ERR % (str(self), buildstatus)) obj_results = ResultSet(result_url, build=self) return obj_results