[Zope-CMF] Help with tests
Charlie Clark
charlie at begeistert.org
Sun Jun 7 09:29:32 EDT 2009
Am 07.06.2009 um 15:26 schrieb Charlie Clark:
> Hi Tres,
>
> I've tried that but am not having much success:
Scratch that - invoking an unrestricted user seems to do the trick:
def test_check_batching(self):
newSecurityManager(None,
UnrestrictedUser('user_foo', '', ['Manager'], ''))
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")
Is this okay? At least it lets me work on the rest of the tests.
Charlie
--
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