Commit 770e5bcd authored by Jérome Perrin's avatar Jérome Perrin

more test of what setProperty should not be allowed to do


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23184 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7c1b947a
......@@ -746,8 +746,17 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
Check if edit method works.
"""
object_instance = sequence.get('object_instance')
self.assertRaises(BadRequest,object_instance.setProperty, 'edit',
# can't override a method:
self.assertRaises(BadRequest, object_instance.setProperty, 'edit',
"now this object is 'read only !!!'")
# can't change the portal type and other internal instance attributes
self.assertRaises(BadRequest, object_instance.setProperty,
'portal_type', "Other")
self.assertRaises(BadRequest, object_instance.setProperty,
'workflow_history', {})
self.assertRaises(BadRequest, object_instance.setProperty,
'__dict__', {})
def test_07_setEditProperty(self, quiet=quiet, run=run_all_test):
"""
......@@ -755,7 +764,6 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
"""
if not run: return
sequence_list = SequenceList()
# Test on temp tempAmount.
sequence_string = '\
CreateObject \
CheckEditMethod \
......
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