ZCatalog : sortResults does not work anymore
Bug #1236790 reported by
Thomas Desvenain
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
_limit_sequence is uneffective when it takes as a parameter a sequence of (key, items, getitem) instead of a sequence of items.
the consequence is that sorting + limiting results does not work anymore
i discovered that because it breaks test_queryCatal
To post a comment you must log in.
Failure in test test_queryCatal ogAddCriteria (Products. ATContentTypes. tests.test_ attopic. TestSiteATTopic ) python2. 7/unittest/ case.py" , line 332, in run thomas/ buildouts/ buildout. coredev/ src/Products. ATContentTypes/ Products/ ATContentTypes/ tests/test_ attopic. py", line 402, in test_queryCatal ogAddCriteria assertEqual( len(topic. queryCatalog( sort_on= 'Date', sort_limit=5)), 5) python2. 7/unittest/ case.py" , line 516, in assertEqual func(first, second, msg=msg) python2. 7/unittest/ case.py" , line 509, in _baseAssertEqual eption( msg)
Traceback (most recent call last):
File "/usr/lib/
testMethod()
File "/home/
self.
File "/usr/lib/
assertion_
File "/usr/lib/
raise self.failureExc
AssertionError: 1 != 5
len(topic. queryCatalog( sort_on= 'Date', sort_limit=5) -> 1 log(sort_ on='Date' , sort_limit=5)]) -> 23
len([r for r in topic.queryCata