[Zope-CMF] Help with tests

Charlie Clark charlie at begeistert.org
Sun Jun 7 09:26:10 EDT 2009


Am 07.06.2009 um 15:07 schrieb Tres Seaver:

> Do you need to set up a security manager with 'user_foo', grep for
> 'newSecurityManager' in other CMF tests.


Hi Tres,

I've tried that but am not having much success:

     def test_check_batching(self):
         user = self.uf.getUserById('user_foo') # should be the owner  
of the objects
         user = user.__of__(self.uf)
         newSecurityManager(None, user)
         self._make_batch()
         batch_size = 25
         view = ContentsView(self.folder, TestRequest())
         self.assertEquals(view._getBatchObj().sequence_length,  
batch_size)
         self.assertEquals(view.navigation_next['title'], "PREVIOUS N  
ITEMS")
--
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226





More information about the Zope-CMF mailing list