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

test for optional `max_arity` constraint parameter was missing for

CategoryAcquiredMembershipArity


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18225 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 22b15847
...@@ -968,6 +968,18 @@ class TestConstraint(PropertySheetTestCase): ...@@ -968,6 +968,18 @@ class TestConstraint(PropertySheetTestCase):
obj.setGroup('testGroup1') obj.setGroup('testGroup1')
self.assertEquals(0, len(constraint.checkConsistency(obj))) self.assertEquals(0, len(constraint.checkConsistency(obj)))
def test_CategoryAcquiredMembershipArityNoMax(self):
obj = self._makeOne()
constraint = self._createGenericConstraint(
id='dummy_constraint',
portal_type=('Category',),
base_category=('group',),
klass_name='CategoryAcquiredMembershipArity',
min_arity=1)
self.assertEquals(1, len(constraint.checkConsistency(obj)))
obj.setGroup('testGroup1')
self.assertEquals(0, len(constraint.checkConsistency(obj)))
def stepCreateCategoryRelatedMembershipArity0(self, sequence=None, def stepCreateCategoryRelatedMembershipArity0(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
......
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