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
No related merge requests found
......@@ -528,6 +528,18 @@ class TestInvoiceMixin(TestPackingListMixin,
resource_precision = line.getResourceValue().getQuantityPrecision()
self.assertEquals(round(line.getQuantity(), 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(
self, sequence=None, sequence_list=None, **kw):
......@@ -1170,6 +1182,7 @@ class TestInvoice(TestInvoiceMixin):
stepCheckInvoiceBuilding
stepRebuildAndCheckNothingIsCreated
stepCheckInvoicesConsistency
stepCheckInvoiceLineHasReferenceAndIntIndex
""")
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