Ejemplo n.º 1
0
 def test_zip_succeeds(self):
     from AccessControl.ZopeGuards import guarded_zip
     sm = SecurityManager() # accepts
     old = self.setSecurityManager(sm)
     self.assertEqual(guarded_zip([1,2,3], [3,2,1]), [(1,3),(2,2),(3,1)])
     self.assertEqual(guarded_zip([1,2,3], [1]), [(1,1)])
     self.setSecurityManager(old)
Ejemplo n.º 2
0
 def test_zip_succeeds(self):
     from AccessControl.ZopeGuards import guarded_zip
     sm = SecurityManager() # accepts
     old = self.setSecurityManager(sm)
     self.assertEqual(guarded_zip([1,2,3], [3,2,1]), [(1,3),(2,2),(3,1)])
     self.assertEqual(guarded_zip([1,2,3], [1]), [(1,1)])
     self.setSecurityManager(old)
Ejemplo n.º 3
0
 def test_zip_succeeds(self):
     sm = SecurityManager() # accepts
     old = self.setSecurityManager(sm)
     self.assertEqual(guarded_zip([1,2,3], [3,2,1]), [(1,3),(2,2),(3,1)])
     self.assertEqual(guarded_zip([1,2,3], [1]), [(1,1)])
     self.setSecurityManager(old)