Пример #1
0
 def testErrorInSubReportEntry(self):
     entry_name = 'sub report'
     report = Report(self.report_name)
     subreport = Report(entry_name)
     report.add(entry_name, subreport)
     subreport.error(self.error_reason)
     self.assertEqual(report.get_status(), Report.ERROR)
     self.assertEqual(report.get('reason'), self.error_reason)
Пример #2
0
 def testErrorInOneOfSubReportEntries(self):
     entry_name1 = 'sub report 1'
     entry_name2 = 'sub report 2'
     entry_name3 = 'sub report 3'
     report = Report(self.report_name)
     subreport1 = Report(entry_name1)
     subreport2 = Report(entry_name2)
     subreport3 = Report(entry_name3)
     report.add(entry_name1, subreport1)
     report.add(entry_name2, subreport2)
     report.add(entry_name3, subreport3)
     subreport2.error(self.error_reason)
     self.assertEqual(report.get_status(), Report.ERROR)
     self.assertEqual(report.get('reason'), self.error_reason)
Пример #3
0
 def testErrorWithoutReason(self):
     report = Report(self.report_name)
     self.assertEqual(report.get_status(), Report.PASSED)
     report.error()
     self.assertEqual(report.get_status(), Report.ERROR)
     self.assertEqual(report.get('reason'), None)