Commit 9f29cf91 authored by Jérome Perrin's avatar Jérome Perrin Committed by Arnaud Fontaine

fixup! ERP5Catalog: Fix UnicodeDecodeError on non ascii catalog search when...

fixup! ERP5Catalog: Fix UnicodeDecodeError on non ascii catalog search when the inituser name is unicode

variable was not zope_testSearchNonAsciiWithLegacyUserFolderUser
parent 85f7b0f4
......@@ -4127,12 +4127,12 @@ VALUES
person_title = 'abcdé'
person_module.newContent(portal_type='Person', title=person_title)
self.tic()
uf = self.getPortal().acl_users
# The inituser is decoded by `decode('utf-8')` on Zope4 startup, and it is unicode on py2
# see:
# https://github.com/zopefoundation/AccessControl/commit/9a9c57f1c6311251a6e51a326751cf81e2810e2c
# imitate the inituser handling
inituser_login = b'zope_testSearchNonAsciiWithLegacyUserFolderUser'
inituser_str = inituser_login.decode('utf-8')
......@@ -4140,8 +4140,6 @@ VALUES
uf._doAddUser(inituser_str, '', ['Member', 'Assignor'], [])
self.loginByUserName(inituser_str)
folder_object_list = [x.getObject().getId() for x in
person_module.searchFolder(title=person_title)]
search_result = person_module.searchFolder(title=person_title)
self.assertTrue(len(search_result) > 0)
self.assertEqual('abcdé', search_result[0].getObject().getTitle())
......
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