[Erp5-report] r21159 - /erp5/trunk/products/ERP5/tests/testInvoice.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue May 27 02:56:21 CEST 2008


Author: rafael
Date: Tue May 27 02:56:20 2008
New Revision: 21159

URL: http://svn.erp5.org?rev=21159&view=rev
Log:
stepSetOrderPriceCurrency and stepSetOrderPriceCurrency ware moved to testPackingListMixin.
Added a check for PriceCurrency

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=21159&r1=21158&r2=21159&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInvoice.py (original)
+++ erp5/trunk/products/ERP5/tests/testInvoice.py Tue May 27 02:56:20 2008
@@ -142,29 +142,29 @@
     client2.validate()
     sequence.edit(client2=client2)
 
-  def stepCreateCurrency(self, sequence, **kw) :
-    """Create a default currency. """
-    currency_module = self.getCurrencyModule()
-    if len(currency_module.objectValues(id='EUR'))==0:
-      currency = self.getCurrencyModule().newContent(
-          portal_type='Currency',
-          id="EUR",
-          base_unit_quantity=0.01,
-          )
-    else:
-      currency = currency_module.objectValues(id='EUR')[0]
-    sequence.edit(currency=currency)
-
-  def stepSetOrderPriceCurrency(self, sequence, **kw) :
-    """Set the price currency of the order.
-
-    This step is not necessary.
-    TODO : - include a test without this step.
-           - include a test with this step late.
-    """
-    currency = sequence.get('currency')
-    order = sequence.get('order')
-    order.setPriceCurrency(currency.getRelativeUrl())
+#  def stepCreateCurrency(self, sequence, **kw) :
+#    """Create a default currency. """
+#    currency_module = self.getCurrencyModule()
+#    if len(currency_module.objectValues(id='EUR'))==0:
+#      currency = self.getCurrencyModule().newContent(
+#          portal_type='Currency',
+#          id="EUR",
+#          base_unit_quantity=0.01,
+#          )
+#    else:
+#      currency = currency_module.objectValues(id='EUR')[0]
+#    sequence.edit(currency=currency)
+#
+#  def stepSetOrderPriceCurrency(self, sequence, **kw) :
+#    """Set the price currency of the order.
+#
+#    This step is not necessary.
+#    TODO : - include a test without this step.
+#           - include a test with this step late.
+#    """
+#    currency = sequence.get('currency')
+#    order = sequence.get('order')
+#    order.setPriceCurrency(currency.getRelativeUrl())
 
   def stepCreateSaleInvoiceTransactionRule(self, sequence, **kw) :
     """Create the rule for accounting. """
@@ -550,6 +550,8 @@
                                        invoice.getDestinationAdministration())
     self.assertEquals(packing_list.getSourceAdministration(), \
                                        invoice.getSourceAdministration())
+    self.assertEquals(packing_list.getPriceCurrency(), \
+                                       invoice.getPriceCurrency())
 
 
 




More information about the Erp5-report mailing list