示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 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)