def get_report(self): ''' need to wrap get_report, since we need to parse the report ''' report_dict = self._meta_get_report() report = Report.from_dict(report_dict) return report
def get(self, test_id): ''' get report by the test id :param test_id: test id :return: Report object ''' self.select('*', 'test_id=?', [test_id]) row = self._cursor.fetchone() if not row: raise KeyError('No report with test id %s in the DB' % test_id) values = self.row_to_dict(row) content = self._deserialize_dict(values['content']) return Report.from_dict(content)