def testMonthlyPayrollTotals(self):
        """Last row should contain summary totals over all users."""
        self._setupMonthlyTotals()
        totals = self.rows[-1]

        work_total = Decimal('110.00')
        self.assertEquals(totals['work_total'], work_total)

        self.assertEquals(len(totals['billable']), 1 + 1)
        for entry in totals['billable']:
            self.assertEquals(entry['hours'], Decimal('90.00'))
            self.assertEquals(entry['percent'], Decimal('90.00') / work_total * 100)

        self.assertEquals(len(totals['nonbillable']), 1 + 1)
        for entry in totals['nonbillable']:
            self.assertEquals(entry['hours'], Decimal('20.00'))
            self.assertEquals(entry['percent'], work_total * 100 / Decimal('20.00'))

        self.assertEquals(len(totals['leave']), 2 + 1)
        sick_index = self.labels['leave'].index(self.sick.name)
        vacation_index = self.labels['leave'].index(self.vacation.name)
        self.assertEquals(
            totals['leave'][sick_index]['hours'], Decimal('80.00'))
        self.assertEquals(
            totals['leave'][sick_index]['percent'],
            Decimal('80.00') / Decimal('120.00') * 100)
        self.assertEquals(
            totals['leave'][vacation_index]['hours'], Decimal('40.00'))
        self.assertEquals(
            totals['leave'][vacation_index]['percent'],
            Decimal('40.00') / Decimal('120.00') * 100)
        self.assertEquals(totals['leave'][-1]['hours'], Decimal('120.00'))
        self.assertEquals(totals['leave'][-1]['percent'], Decimal('100.00'))

        self.assertEquals(totals['grand_total'], Decimal('230.00'))
dataset/ETHPy150Open caktus/django-timepiece/timepiece/reports/tests/test_payroll.py/PayrollTest.testMonthlyPayrollTotals/swapped operands of `/`