[Erp5-report] r22614 - /erp5/trunk/products/ERP5/tests/
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jul 22 10:28:35 CEST 2008
Author: jerome
Date: Tue Jul 22 10:28:33 2008
New Revision: 22614
URL: http://svn.erp5.org?rev=22614&view=rev
Log:
use invoice_portal_type everywhere in tests
Modified:
erp5/trunk/products/ERP5/tests/testAccountingRules.py
erp5/trunk/products/ERP5/tests/testInvoice.py
Modified: erp5/trunk/products/ERP5/tests/testAccountingRules.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testAccountingRules.py?rev=22614&r1=22613&r2=22614&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testAccountingRules.py (original)
+++ erp5/trunk/products/ERP5/tests/testAccountingRules.py Tue Jul 22 10:28:33 2008
@@ -54,14 +54,14 @@
class PurchaseInvoiceTest:
- invoice_transaction_portal_type = 'Sale Invoice Transaction'
+ invoice_portal_type = 'Sale Invoice Transaction'
invoice_transaction_line_portal_type \
= "Sale Invoice Transaction Line"
invoice_line_portal_type = "Invoice Line"
invoice_cell_portal_type = "Invoice Cell"
class SaleInvoiceTest:
- invoice_transaction_portal_type = 'Sale Invoice Transaction'
+ invoice_portal_type = 'Sale Invoice Transaction'
invoice_transaction_line_portal_type \
= "Sale Invoice Transaction Line"
invoice_line_portal_type = "Invoice Line"
@@ -500,7 +500,7 @@
empty_invoice = self.getAccountingModule().newContent(
id = 'empty_invoice',
- portal_type = self.invoice_transaction_portal_type,
+ portal_type = self.invoice_portal_type,
resource = currency.getRelativeUrl(),
stop_date = DateTime(2004, 01, 01),
start_date = DateTime(2004, 01, 01),
@@ -528,7 +528,7 @@
simple_invoice = self.getAccountingModule().newContent(
id = 'simple_invoice',
- portal_type = self.invoice_transaction_portal_type,
+ portal_type = self.invoice_portal_type,
resource = currency.getRelativeUrl(),
price_currency = currency.getRelativeUrl(),
stop_date = DateTime(2004, 01, 01),
@@ -565,7 +565,7 @@
simple_invoice = self.getAccountingModule().newContent(
id = 'other_simple_invoice',
- portal_type = self.invoice_transaction_portal_type,
+ portal_type = self.invoice_portal_type,
resource = currency.getRelativeUrl(),
stop_date = DateTime(2004, 01, 01),
start_date = DateTime(2004, 01, 01),
@@ -655,7 +655,7 @@
simple_invoice = self.getAccountingModule().newContent(
id = 'simple_invoice_two_lines',
- portal_type = self.invoice_transaction_portal_type,
+ portal_type = self.invoice_portal_type,
resource = currency.getRelativeUrl(),
stop_date = DateTime(2004, 01, 01),
start_date = DateTime(2004, 01, 01),
@@ -698,7 +698,7 @@
simple_invoice = self.getAccountingModule().newContent(
id = 'simple_invoice_two_cells',
- portal_type = self.invoice_transaction_portal_type,
+ portal_type = self.invoice_portal_type,
resource = currency.getRelativeUrl(),
stop_date = DateTime(2004, 01, 01),
start_date = DateTime(2004, 01, 01),
@@ -772,7 +772,7 @@
multi_line_invoice = self.getAccountingModule().newContent(
id = 'multi_line_invoice',
- portal_type = self.invoice_transaction_portal_type,
+ portal_type = self.invoice_portal_type,
resource = currency.getRelativeUrl(),
price_currency = currency.getRelativeUrl(),
stop_date = DateTime(2004, 01, 01),
Modified: erp5/trunk/products/ERP5/tests/testInvoice.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testInvoice.py?rev=22614&r1=22613&r2=22614&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInvoice.py (original)
+++ erp5/trunk/products/ERP5/tests/testInvoice.py Tue Jul 22 10:28:33 2008
@@ -335,7 +335,7 @@
"""
packing_list = sequence.get('packing_list')
related_invoice_list = packing_list.getCausalityRelatedValueList(
- portal_type=self.invoice_transaction_portal_type)
+ portal_type=self.invoice_portal_type)
packing_list_building_state = 'started'
packing_list_state = packing_list.getSimulationState()
@@ -535,7 +535,7 @@
coping the atributes from packing list to invoice."""
packing_list = sequence.get('packing_list')
related_invoice_list = packing_list.getCausalityRelatedValueList(
- portal_type=self.invoice_transaction_portal_type)
+ portal_type=self.invoice_portal_type)
self.assertEquals(len(related_invoice_list), 1)
invoice = related_invoice_list[0]
self.assertEquals(packing_list.getSource(), invoice.getSource())
@@ -625,14 +625,14 @@
# Now we will check that we have two invoices created
packing_list = sequence.get('packing_list')
invoice_list = packing_list.getCausalityRelatedValueList(
- portal_type=self.invoice_transaction_portal_type)
+ portal_type=self.invoice_portal_type)
self.assertEquals(len(invoice_list),1)
invoice = invoice_list[0]
self.assertEquals(invoice.getSimulationState(), 'confirmed')
sequence.edit(invoice=invoice)
new_packing_list = sequence.get('new_packing_list')
new_invoice_list = new_packing_list.getCausalityRelatedValueList(
- portal_type=self.invoice_transaction_portal_type)
+ portal_type=self.invoice_portal_type)
self.assertEquals(len(new_invoice_list),1)
new_invoice = new_invoice_list[0]
self.assertEquals(new_invoice.getSimulationState(), 'confirmed')
More information about the Erp5-report
mailing list