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

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
parent dfdbeb25
......@@ -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):
......
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