From ce5fa613ed6ac74b2f16a9cee5735ff283ecc405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Wed, 14 Mar 2007 13:32:34 +0000 Subject: [PATCH] make sure we can search catalog with a dynamic key and a standard catalog key git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13413 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Catalog/tests/testERP5Catalog.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/product/ERP5Catalog/tests/testERP5Catalog.py b/product/ERP5Catalog/tests/testERP5Catalog.py index 43ca9679a4..aa483ebcd0 100644 --- a/product/ERP5Catalog/tests/testERP5Catalog.py +++ b/product/ERP5Catalog/tests/testERP5Catalog.py @@ -722,6 +722,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): self.assertEquals(organisation.getGroupValue(), group_nexedi_category) organisation2 = module.newContent(portal_type='Organisation',) organisation2.setGroup('storever') + organisation2.setTitle('Organisation 2') self.assertEquals(organisation2.getGroupValue(), group_nexedi_category2) # Flush message queue get_transaction().commit() @@ -734,7 +735,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): organisation_list = [x.getObject() for x in module.searchFolder(default_group_title='Nexedi')] self.assertEquals(organisation_list,[organisation]) - # Try to get the organisation with the group id nexedi + # Try to get the organisation with the group id organisation_list = [x.getObject() for x in module.searchFolder(group_id='storever')] self.assertEquals(organisation_list,[organisation2]) @@ -759,6 +760,12 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): organisation_list = [x.getObject() for x in module.searchFolder(group_uid=group_nexedi_category.getUid())] self.assertEquals(organisation_list, [organisation]) + # Try to get the organisation with the group id AND title of the document + organisation_list = [x.getObject() for x in + module.searchFolder(group_id='storever', + title='Organisation 2')] + self.assertEquals(organisation_list,[organisation2]) + def test_21_SearchFolderWithDynamicStrictRelatedKey(self, quiet=quiet, run=run_all_test): -- 2.30.9