[Erp5-report] r18942 - /erp5/trunk/products/ERP5Banking/tests/

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jan 31 12:21:43 CET 2008


Author: vincent
Date: Thu Jan 31 12:21:42 2008
New Revision: 18942

URL: http://svn.erp5.org?rev=18942&view=rev
Log:
HQ "archives" (and does not "finish") the document when it originates from an agency.

Modified:
    erp5/trunk/products/ERP5Banking/tests/testERP5BankingMutilatedBanknote.py

Modified: erp5/trunk/products/ERP5Banking/tests/testERP5BankingMutilatedBanknote.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Banking/tests/testERP5BankingMutilatedBanknote.py?rev=18942&r1=18941&r2=18942&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Banking/tests/testERP5BankingMutilatedBanknote.py (original)
+++ erp5/trunk/products/ERP5Banking/tests/testERP5BankingMutilatedBanknote.py Thu Jan 31 12:21:42 2008
@@ -357,6 +357,13 @@
     self.assertEqual(len(self.hq_mutilated_banknote.objectValues(portal_type="Exchanged Mutilated Banknote Line")), 0.0)
     self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, self.hq_mutilated_banknote, 'finish_action', wf_id='mutilated_banknote_workflow')
 
+  def stepTryArchiveHQWithNoLineDefined(self, sequence=None, sequence_list=None, **kw):
+    """
+    Try to archive with no line defined on the document
+    """
+    self.assertEqual(len(self.hq_mutilated_banknote.objectValues(portal_type="Exchanged Mutilated Banknote Line")), 0.0)
+    self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, self.hq_mutilated_banknote, 'archive_action', wf_id='mutilated_banknote_workflow')
+
   def stepTryFinishWithNoAmountDefined(self, sequence=None, sequence_list=None, **kw):
     """
     Try to confirm with no amount defined on the document
@@ -370,6 +377,13 @@
     """
     self.assertEqual(self.hq_mutilated_banknote.getDestinationTotalAssetPrice(), 0.0)
     self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, self.hq_mutilated_banknote, 'finish_action', wf_id='mutilated_banknote_workflow')
+
+  def stepTryArchiveHQWithNoAmountDefined(self, sequence=None, sequence_list=None, **kw):
+    """
+    Try to archive with no amount defined on the document
+    """
+    self.assertEqual(self.hq_mutilated_banknote.getDestinationTotalAssetPrice(), 0.0)
+    self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, self.hq_mutilated_banknote, 'archive_action', wf_id='mutilated_banknote_workflow')
 
   def stepFinishDocument(self, sequence=None, sequence_list=None, **kw):
     """
@@ -766,7 +780,7 @@
                         + 'CreateHQIncomingLine Tic StopHQDocument Tic ' \
                         + 'CheckHQInventoryWithIncommingMaculatedBanknotes ' \
                         + 'CheckHQMaculatedBanknoteInventory ' \
-                        + 'TryFinishHQWithNoLineDefined CreateHQExchangedLine Tic TryFinishHQWithNoAmountDefined FinishHQDocument Tic ' \
+                        + 'TryArchiveHQWithNoLineDefined CreateHQExchangedLine Tic TryArchiveHQWithNoAmountDefined ArchiveHQDocument Tic ' \
                         + 'HQLogout ' \
                         + 'CheckHQFinalInventoryWithPayBack '\
                         + 'CreateExchangedLine Tic FinishDocument Tic ' \




More information about the Erp5-report mailing list