[Erp5-report] r21070 - /erp5/trunk/products/ERP5/tests/testInvoice.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed May 21 18:55:29 CEST 2008
Author: rafael
Date: Wed May 21 18:55:28 2008
New Revision: 21070
URL: http://svn.erp5.org?rev=21070&view=rev
Log:
Splitted TestInvoice in TesteInvoice and TestInvoiceMixin
Added missed quiet and run parameters.
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=21070&r1=21069&r2=21070&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInvoice.py (original)
+++ erp5/trunk/products/ERP5/tests/testInvoice.py Wed May 21 18:55:28 2008
@@ -44,13 +44,10 @@
from testPackingList import TestPackingListMixin
from testAccountingRules import TestAccountingRulesMixin
-class TestInvoice(TestPackingListMixin,
+class TestInvoiceMixin(TestPackingListMixin,
TestAccountingRulesMixin,
ERP5TypeTestCase):
"""Test invoice are created from orders then packing lists. """
-
- RUN_ALL_TESTS = 1
- quiet = 1
default_region = "europe/west/france"
vat_gap = 'fr/pcg/4/44/445/4457/44571'
@@ -1044,6 +1041,14 @@
for applied_rule in applied_rule_set:
checkTree(applied_rule)
+class TestInvoice(TestInvoiceMixin):
+ """
+ Tests for Invoice
+ """
+
+ RUN_ALL_TESTS = 1
+ quiet = 1
+
# default sequence for one line of not varianted resource.
PACKING_LIST_DEFAULT_SEQUENCE = """
stepCreateEntities
@@ -1961,10 +1966,13 @@
""")
sequence_list.play(self, quiet=quiet)
- def test_invoice_transaction_line_resource(self):
- # tests that simulation movements corresponding to accounting line have a
- # good resource in the simulation
-
+ def test_19_invoice_transaction_line_resource(self, quiet=quiet,
+ run=RUN_ALL_TESTS):
+ """
+ tests that simulation movements corresponding to accounting line have a
+ good resource in the simulation
+ """
+ if not run: return
sequence_list = SequenceList()
sequence = sequence_list.addSequenceString('''
stepCreateEntities
@@ -1981,7 +1989,7 @@
stepOrderOrder
stepTic
''')
- sequence_list.play(self, quiet=1)
+ sequence_list.play(self, quiet=quiet)
order = sequence.get('order')
order_price_currency = order.getPriceCurrency()
self.assertNotEquals(None, order_price_currency)
@@ -1998,9 +2006,12 @@
self.assertEquals(order_price_currency,
delivery_movement.getPriceCurrency())
- def test_modify_planned_order_invoicing_rule(self):
- # tests that modifying a planned order affects movements from invoicing
- # rule
+ def test_20_modify_planned_order_invoicing_rule(self, quiet=quiet,
+ run=RUN_ALL_TESTS):
+ """
+ tests that modifying a planned order affects movements from invoicing
+ rule
+ """
sequence_list = SequenceList()
sequence = sequence_list.addSequenceString('''
stepCreateEntities
@@ -2017,7 +2028,7 @@
stepOrderOrder
stepTic
''')
- sequence_list.play(self, quiet=1)
+ sequence_list.play(self, quiet=quiet)
order = sequence.get('order')
order_line = sequence.get('order_line')
@@ -2025,7 +2036,6 @@
portal_type='Organisation',
title='Other Entity')
-
related_applied_rule = order.getCausalityRelatedValue(
portal_type='Applied Rule')
delivery_movement = related_applied_rule.contentValues()[0]
@@ -2174,9 +2184,13 @@
self.assertEquals(DateTime(2002, 03, 04),
invoice_movement.getStopDate())
- def test_modify_planned_order_invoice_transaction_rule(self):
- # tests that modifying a planned order affects movements from invoice
- # transaction rule
+ def test_21_modify_planned_order_invoice_transaction_rule(self, quiet=quiet,
+ run=RUN_ALL_TESTS):
+ """
+ tests that modifying a planned order affects movements from invoice
+ transaction rule
+ """
+ if not run: return
sequence_list = SequenceList()
sequence = sequence_list.addSequenceString('''
stepCreateEntities
@@ -2193,7 +2207,7 @@
stepOrderOrder
stepTic
''')
- sequence_list.play(self, quiet=1)
+ sequence_list.play(self, quiet=quiet)
order = sequence.get('order')
order_line = sequence.get('order_line')
More information about the Erp5-report
mailing list