[Erp5-report] r27646 - /erp5/trunk/products/ERP5/tests/testInventoryAPI.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jun 18 10:09:41 CEST 2009
Author: seb
Date: Thu Jun 18 10:09:38 2009
New Revision: 27646
URL: http://svn.erp5.org?rev=27646&view=rev
Log:
since commit 27199, message repr is not the same. So now
do not use the repr of the list but look at the content
of every message instead. This fix current failures
of the test
Modified:
erp5/trunk/products/ERP5/tests/testInventoryAPI.py
Modified: erp5/trunk/products/ERP5/tests/testInventoryAPI.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testInventoryAPI.py?rev=27646&r1=27645&r2=27646&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInventoryAPI.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testInventoryAPI.py [utf8] Thu Jun 18 10:09:38 2009
@@ -2061,9 +2061,9 @@
workflow_history = self.workflow_tool.getInfoFor(ob=new_inventory,
name='history', wf_id=workflow_id)
workflow_error_message = str(workflow_history[-1]['error_message'])
- self.assertTrue(
- workflow_error_message.find('There is already an inventory')>=0,
- workflow_error_message)
+ self.assertTrue(len(workflow_error_message))
+ self.assertTrue(len([x for x in workflow_error_message \
+ if x.find('There is already an inventory')]))
# Add a case in order to check a bug when the other inventory at the
# same date does not change stock values
@@ -2081,9 +2081,9 @@
workflow_history = self.workflow_tool.getInfoFor(ob=new_inventory,
name='history', wf_id=workflow_id)
workflow_error_message = str(workflow_history[-1]['error_message'])
- self.assertTrue(
- workflow_error_message.find('There is already an inventory')>=0,
- workflow_error_message)
+ self.assertTrue(len(workflow_error_message))
+ self.assertTrue(len([x for x in workflow_error_message \
+ if x.find('There is already an inventory')]))
finally:
# remove all property sheet we added to type informations
ttool = self.getTypesTool()
More information about the Erp5-report
mailing list