def test_equal_2(self): self.assertEqual(generate_report(self.records[:1]), dedent('''\ Group: 001 Product: 0001 Value: 12 Group total: 12 Total: 12'''))
def test_equal_2(self): self.assertEqual( generate_report(self.records[:1]), dedent('''\ Group: 001 Product: 0001 Value: 12 Group total: 12 Total: 12'''))
def test_equal_4(self): self.assertEqual(generate_report(self.records), dedent('''\ Group: 001 Product: 0001 Value: 12 Product: 0012 Value: 1032 Group total: 1044 Group: 007 Product: 0027 Value: 207 Product: 0112 Value: 12119 Product: 1009 Value: 200 Group total: 12526 Total: 13570'''))
def test_equal_4(self): self.assertEqual( generate_report(self.records), dedent('''\ Group: 001 Product: 0001 Value: 12 Product: 0012 Value: 1032 Group total: 1044 Group: 007 Product: 0027 Value: 207 Product: 0112 Value: 12119 Product: 1009 Value: 200 Group total: 12526 Total: 13570'''))
def test_equal_1(self): self.assertEqual(generate_report([]), 'Total: 0')