Example #1
0
 def test_expected_progress_report(self):
     """
     Test that expected progress report returns correct figures
     """
     report = progress.ExpectedProgressReport(self.tally.id)
     self.assertEqual(report.number, 10)
     self.assertEqual(report.total, 10)
     self.assertEqual(report.percentage, 100.0)
Example #2
0
 def test_progress_for_office(self):
     """
     Test that progress office report return correct figures
     """
     report = progress.ExpectedProgressReport(self.tally.id)
     self.assertEqual(report.number, 10)
     self.assertEqual(report.total, 10)
     self.assertEqual(report.percentage, 100.0)
Example #3
0
 def test_progress_report(self):
     report = progress.ExpectedProgressReport()
     report.queryset = None
     report.filtered_queryset = None
     with self.assertRaises(ImproperlyConfigured):
         report.total
     with self.assertRaises(ImproperlyConfigured):
         report.number
Example #4
0
 def test_progress_report(self):
     """
     Test that progress report returns correct figures
     """
     report = progress.ExpectedProgressReport(self.tally.id)
     report.queryset = None
     report.filtered_queryset = None
     with self.assertRaises(ImproperlyConfigured):
         report.total
     with self.assertRaises(ImproperlyConfigured):
         report.number
Example #5
0
def getOverviews(tally_id):
    overviews = [
            p.ExpectedProgressReport(tally_id),
            p.IntakeProgressReport(tally_id),
            p.DataEntry1ProgressReport(tally_id),
            p.DataEntry2ProgressReport(tally_id),
            p.CorrectionProgressReport(tally_id),
            p.QualityControlProgressReport(tally_id),
            p.ArchivedProgressReport(tally_id),
            p.ClearanceProgressReport(tally_id),
            p.AuditProgressReport(tally_id),
            p.NotRecievedProgressReport(tally_id)
    ]

    return overviews
Example #6
0
    def get(self, *args, **kwargs):
        overviews = [
            p.ExpectedProgressReport(),
            p.IntakenProgressReport(),
            p.DataEntry1ProgressReport(),
            p.DataEntry2ProgressReport(),
            p.CorrectionProgressReport(),
            p.QualityControlProgressReport(),
            p.ArchivingProgressReport(),
            p.ArchivedProgressReport(),
            p.ClearanceProgressReport(),
            p.AuditProgressReport(),
            p.NotRecievedProgressReport()
        ]

        return self.render_to_response(
            self.get_context_data(overviews=overviews,
                                  per_office=self.get_per_office_progress()))
Example #7
0
 def test_progress_for_office(self):
     report = progress.ExpectedProgressReport()
     report = report.for_center_office('1')
     self.assertEqual(report.number, 2)
     self.assertEqual(report.total, 2)
     self.assertEqual(report.percentage, 100.0)
Example #8
0
 def test_expected_progress_report(self):
     report = progress.ExpectedProgressReport()
     self.assertEqual(report.number, 11)
     self.assertEqual(report.total, 11)
     self.assertEqual(report.percentage, 100.0)
Example #9
0
 def test_progress_report(self):
     report = progress.ExpectedProgressReport()
     with self.assertRaises(ImproperlyConfigured):
         report.total
     with self.assertRaises(ImproperlyConfigured):
         report.number