Commit ba3cfd48 authored by Jérome Perrin's avatar Jérome Perrin

tests that invoice line gets an int index and a reference


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22734 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4bff4ffd
...@@ -529,6 +529,18 @@ class TestInvoiceMixin(TestPackingListMixin, ...@@ -529,6 +529,18 @@ class TestInvoiceMixin(TestPackingListMixin,
self.assertEquals(round(line.getQuantity(), resource_precision), self.assertEquals(round(line.getQuantity(), resource_precision),
round(expected_price * line_ratio, resource_precision)) round(expected_price * line_ratio, resource_precision))
def stepCheckInvoiceLineHasReferenceAndIntIndex(self, sequence=None, **kw):
"""Check that the unique invoice line in the invoice has reference and int
index.
"""
invoice = sequence.get('invoice')
invoice_line_list = invoice.contentValues(
portal_type=self.invoice_line_portal_type)
self.assertEquals(1, len(invoice_line_portal_type))
invoice_line = invoice_line_list[0]
self.assertEquals(1, invoice_line.getIntIndex())
self.assertEquals('1', invoice_line.getReference())
def stepCheckPackingListInvoice( def stepCheckPackingListInvoice(
self, sequence=None, sequence_list=None, **kw): self, sequence=None, sequence_list=None, **kw):
""" Checks if the delivery builder is working as expected, """ Checks if the delivery builder is working as expected,
...@@ -1170,6 +1182,7 @@ class TestInvoice(TestInvoiceMixin): ...@@ -1170,6 +1182,7 @@ class TestInvoice(TestInvoiceMixin):
stepCheckInvoiceBuilding stepCheckInvoiceBuilding
stepRebuildAndCheckNothingIsCreated stepRebuildAndCheckNothingIsCreated
stepCheckInvoicesConsistency stepCheckInvoicesConsistency
stepCheckInvoiceLineHasReferenceAndIntIndex
""") """)
sequence_list.play(self, quiet=quiet) sequence_list.play(self, quiet=quiet)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment