[Erp5-report] r22734 - /erp5/trunk/products/ERP5/tests/testInvoice.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jul 29 18:58:11 CEST 2008
Author: jerome
Date: Tue Jul 29 18:58:10 2008
New Revision: 22734
URL: http://svn.erp5.org?rev=22734&view=rev
Log:
tests that invoice line gets an int index and a reference
Modified:
erp5/trunk/products/ERP5/tests/testInvoice.py
Modified: erp5/trunk/products/ERP5/tests/testInvoice.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testInvoice.py?rev=22734&r1=22733&r2=22734&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInvoice.py (original)
+++ erp5/trunk/products/ERP5/tests/testInvoice.py Tue Jul 29 18:58:10 2008
@@ -528,6 +528,18 @@
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 @@
stepCheckInvoiceBuilding
stepRebuildAndCheckNothingIsCreated
stepCheckInvoicesConsistency
+ stepCheckInvoiceLineHasReferenceAndIntIndex
""")
sequence_list.play(self, quiet=quiet)
More information about the Erp5-report
mailing list