Commit 5e2d14d6 authored by Sebastien Robin's avatar Sebastien Robin

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

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27646 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9ce5e30a
......@@ -2061,9 +2061,9 @@ class TestInventoryDocument(InventoryAPITestCase):
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 @@ class TestInventoryDocument(InventoryAPITestCase):
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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment