Commit 77e89625 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

more tests in test_PropertyTypeValidityWithUnauthorizedCategory, that still fails.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30415 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 551230ef
...@@ -1449,11 +1449,22 @@ class TestConstraint(PropertySheetTestCase): ...@@ -1449,11 +1449,22 @@ class TestConstraint(PropertySheetTestCase):
id='testGroup3')) id='testGroup3'))
group3.manage_permission('Access contents information', ['Manager'], 0) group3.manage_permission('Access contents information', ['Manager'], 0)
assignment.setSourceValue(group3) assignment.setSourceValue(group3)
# Manager can access testGroup3 # modify title attribute directly to violate PropertyTypeValidity
self.assertEquals([], person.checkConsistency()) # constraint.
group3.title=123
# Manager can access testGroup3, so full information is included in
# the error message.
error_list = person.checkConsistency()
self.assertEquals(1, len(error_list))
self.assertEquals("Attribute source_title should be of type string but is of type <type 'int'>",
str(error_list[0].getMessage()))
self.stepLoginAsAssignee() self.stepLoginAsAssignee()
# Assignee cannot access testGroup3 # Assignee cannot access testGroup3, so full information is not
self.assertEquals([], person.checkConsistency()) # included in the error message.
error_list = person.checkConsistency()
self.assertEquals(1, len(error_list))
self.assertNotEquals("Attribute source_title should be of type string but is of type <type 'int'>",
str(error_list[0].getMessage()))
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
......
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