Commit bfa87093 authored by Jérome Perrin's avatar Jérome Perrin

call getattr later, otherwise we get the AttributeError before calling

assertRaises



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12033 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bb8d54c3
...@@ -946,7 +946,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -946,7 +946,7 @@ class TestBase(ERP5TypeTestCase):
# Add a non-existent workflow. # Add a non-existent workflow.
pw = self.getWorkflowTool() pw = self.getWorkflowTool()
dummy_worlflow_id = 'never_existent_workflow' dummy_worlflow_id = 'never_existent_workflow'
pw.manage_addWorkflow('dc_workflow (Web-configurable workflow)', pw.manage_addWorkflow('dc_workflow (Web-configurable workflow)',
dummy_worlflow_id) dummy_worlflow_id)
cbt = pw._chains_by_type cbt = pw._chains_by_type
props = {} props = {}
...@@ -961,7 +961,8 @@ class TestBase(ERP5TypeTestCase): ...@@ -961,7 +961,8 @@ class TestBase(ERP5TypeTestCase):
_aq_reset() _aq_reset()
try: try:
self.assertRaises(AttributeError, obj.thisMethodShouldNotBePresent) self.assertRaises(AttributeError, getattr, obj,
'thisMethodShouldNotBePresent')
finally: finally:
# Make sure that the artificial workflow is not referred to any longer. # Make sure that the artificial workflow is not referred to any longer.
cbt = pw._chains_by_type cbt = pw._chains_by_type
......
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