From ddde48e0ff4e55dcd783a4679a0c79ee25d2864a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 11 Dec 2007 12:21:01 +0000
Subject: [PATCH] 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
---
 product/ERP5Type/tests/testConstraint.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/product/ERP5Type/tests/testConstraint.py b/product/ERP5Type/tests/testConstraint.py
index 3fe394aa7f..0015c4cb5d 100644
--- a/product/ERP5Type/tests/testConstraint.py
+++ b/product/ERP5Type/tests/testConstraint.py
@@ -968,6 +968,18 @@ class TestConstraint(PropertySheetTestCase):
     obj.setGroup('testGroup1')
     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, 
                                                 sequence_list=None, **kw):
-- 
2.30.9