From a817170e21dd42e548386d026467bf92b1d5a7d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Wed, 5 Sep 2007 09:27:40 +0000 Subject: [PATCH] don't test that group category is empty, but that it does not already contain what we want to add git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16064 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/tests/testConstraint.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/product/ERP5Type/tests/testConstraint.py b/product/ERP5Type/tests/testConstraint.py index ad6d20805a..7e7fcded7b 100644 --- a/product/ERP5Type/tests/testConstraint.py +++ b/product/ERP5Type/tests/testConstraint.py @@ -76,10 +76,11 @@ class TestConstraint(PropertySheetTestCase): some categories for testing them """ category_list = ['testGroup1', 'testGroup2'] - if len(self.category_tool.group.contentValues()) == 0 : + group = self.category_tool.group + if 'testGroup1' not in group.contentIds(): for category_id in category_list: - o = self.category_tool.group.newContent(portal_type='Category', - id=category_id) + o = group.newContent(portal_type='Category', + id=category_id) def stepDeleteObjectModuleContent(self, sequence=None, sequence_list=None, **kw): -- 2.30.9