def test_sum_succeeds(self): from AccessControl.ZopeGuards import guarded_sum sm = SecurityManager() # accepts old = self.setSecurityManager(sm) self.assertEqual(guarded_sum([1,2,3]), 6) self.assertEqual(guarded_sum([1,2,3], start=36), 42) self.setSecurityManager(old)
def test_sum_succeeds(self): from AccessControl.ZopeGuards import guarded_sum sm = SecurityManager() # accepts old = self.setSecurityManager(sm) self.assertEqual(guarded_sum([1, 2, 3]), 6) self.assertEqual(guarded_sum([1, 2, 3], start=36), 42) self.setSecurityManager(old)
def test_sum_succeeds(self): sm = SecurityManager() # accepts old = self.setSecurityManager(sm) self.assertEqual(guarded_sum([1,2,3]), 6) self.assertEqual(guarded_sum([1,2,3], start=36), 42) self.setSecurityManager(old)