Ignore:
Timestamp:
Sep 14, 2012 10:16:29 AM (12 years ago)
Author:
vmaksymiv
Message:

PPP fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.portlet.collection/trunk/quintagroup/portlet/collection/tests/test_portlet.py

    r3555 r3556  
    195195 
    196196    def testRandomQuery(self): 
    197         # we're being perhaps a bit too clever in random mode with the internals of the 
    198         # LazyMap returned by the collection query, so let's try a bunch of scenarios 
    199         # to make sure they work 
     197        # we're being perhaps a bit too clever in random mode with the 
     198        # internals of the LazyMap returned by the collection query, so let's 
     199        # try a bunch of scenarios to make sure they work 
    200200 
    201201        def reset_memoize(inst): 
    202             # Decorator memoize adds attribute ('_memojito_') to class instance. 
     202            # Decorator memoize adds attribute('_memojito_') to class instance. 
    203203            # It has cached function and their values so it should be deleted 
    204204            # for testing. 
     
    222222            getattr(self.folder, 'folder_%s' % i).reindexObject() 
    223223 
    224         # collection with no criteria -- should return empty list, without error 
     224        # collection with no criteria -- should return empty list, without 
     225        # error 
    225226        self.assertEqual(len(collectionrenderer.results()), 0) 
    226227        reset_memoize(collectionrenderer) 
     
    253254        collectionrenderer.results() 
    254255 
    255         # collection with sorting -- should behave similarly (sort is ignored internally) 
     256        # collection with sorting -- should behave similarly (sort is 
     257        # ignored internally) 
    256258        self.folder.collection.setSortCriterion('modified', False) 
    257259        self.assertEqual(len(collectionrenderer.results()), 1) 
    258260        reset_memoize(collectionrenderer) 
    259261 
    260         # same criteria, now with limit set to 2 -- should return 2 (random) folders 
     262        # same criteria, now with limit set to 2 -- should return 2 (random) 
     263        # folders 
    261264        collectionrenderer.data.limit = 2 
    262265        self.assertEqual(len(collectionrenderer.results()), 2) 
    263266        reset_memoize(collectionrenderer) 
    264267 
    265         # make sure there's no error if the limit is greater than the # of results found 
     268        # make sure there's no error if the limit is greater than the # of 
     269        # results found 
    266270        collectionrenderer.data.limit = 10 
    267271        self.failUnless(len(collectionrenderer.results()) >= 6) 
Note: See TracChangeset for help on using the changeset viewer.