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

ERP5 documents doesn't have a comparator, so sorting is not guaranted. Use

assertSameSet for comparision.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17182 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 29d34e02
......@@ -2024,9 +2024,8 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
ctool = self.getCatalogTool()
# by default, % in catalog search is a wildcard:
self.assertEquals(sorted([doc, other_doc]),
sorted([x.getObject() for x in
ctool(portal_type='Organisation', title='Foo%')]))
self.assertSameSet([doc, other_doc], [x.getObject() for x in
ctool(portal_type='Organisation', title='Foo%')])
# ... but you can force searches with an exact match key
self.assertEquals([doc], [x.getObject() for x in
ctool(portal_type='Organisation', title=dict(query='Foo%',
......
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