Commit 7f4d8569 authored by Jérome Perrin's avatar Jérome Perrin

Catalog: test for collation and case sensitivity

parent 3e864237
......@@ -662,6 +662,26 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
person_module.searchFolder(title=title)]
self.assertEquals(['5'],folder_object_list)
def test_Collation(self):
person_module = self.getPersonModule()
title = 'Sébastien'
person = person_module.newContent(id='5',portal_type='Person', title=title)
person.immediateReindexObject()
folder_object_list = [x.getObject().getId() for x in
person_module.searchFolder(title=title)]
self.assertEquals(['5'],folder_object_list)
# Searching for Sebastien should also find Sébastien
folder_object_list = [x.getObject().getId() for x in
person_module.searchFolder(title='Sebastien')]
self.assertEquals(['5'],folder_object_list)
# Same for sebastien, as catalog searches are case insensitive
folder_object_list = [x.getObject().getId() for x in
person_module.searchFolder(title='sebastien')]
self.assertEquals(['5'],folder_object_list)
def test_20_SearchFolderWithDynamicRelatedKey(self):
# Create some objects
......
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