Пример #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)