[Erp5-report] r29234 - /erp5/trunk/products/ERP5Banking/tests/testERP5BankingCashMovement.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Sep 28 17:30:21 CEST 2009


Author: vincent
Date: Mon Sep 28 17:30:20 2009
New Revision: 29234

URL: http://svn.erp5.org?rev=29234&view=rev
Log:
Make it easier to debug failures of this assertion by showing generated error message.

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

Modified: erp5/trunk/products/ERP5Banking/tests/testERP5BankingCashMovement.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Banking/tests/testERP5BankingCashMovement.py?rev=29234&r1=29233&r2=29234&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Banking/tests/testERP5BankingCashMovement.py [utf8] (original)
+++ erp5/trunk/products/ERP5Banking/tests/testERP5BankingCashMovement.py [utf8] Mon Sep 28 17:30:20 2009
@@ -416,8 +416,8 @@
     # check its len is 2
     self.assertEqual(len(workflow_history), 2)
     # check we get an "Insufficient balance" message in the workflow history because of the invalid line
-    msg = workflow_history[-1]['error_message']
-    self.assertTrue('Insufficient balance' in "%s" %(msg,))
+    msg = '%s' % (workflow_history[-1]['error_message'], )
+    self.assertTrue('Insufficient balance' in msg, msg)
 
   def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd):
     """




More information about the Erp5-report mailing list