From 625162d94f8c304836cdb0d944c978e6d96c4b78 Mon Sep 17 00:00:00 2001 From: zhangshine Date: Thu, 11 Jun 2015 22:29:16 +0800 Subject: [PATCH] Test item style --- tests/test_templates.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_templates.py b/tests/test_templates.py index d6db30d..17d8940 100644 --- a/tests/test_templates.py +++ b/tests/test_templates.py @@ -94,6 +94,14 @@ class TestSimpleInvoice(unittest.TestCase): self.assertEqual(item_data[-2][-1], Decimal('15.4')) # subtotal self.assertEqual(item_data[-1][-1], Decimal('15.4')) # total + # test style + # ## Subtotal + self.assertEqual(style[-4], ('SPAN', (0, 4), (3, 4))) + self.assertEqual(style[-3], ('ALIGN', (0, 4), (-2, -1), 'RIGHT')) + # ## Total + self.assertEqual(style[-2], ('SPAN', (0, 5), (3, 5))) + self.assertEqual(style[-1], ('ALIGN', (0, 5), (-2, -1), 'RIGHT')) + invoice.finish() self.assertTrue(os.path.exists(invoice_path))