Beispiel #1
0
 def test_pop_validates(self):
     sm = SecurityManager()
     old = self.setSecurityManager(sm)
     pop = get_list_pop([GuardTestCase], 'pop')
     try:
         pop()
     finally:
         self.setSecurityManager(old)
     self.assert_(sm.calls)
Beispiel #2
0
 def test_pop_validates(self):
     sm = SecurityManager()
     old = self.setSecurityManager(sm)
     pop = get_list_pop([GuardTestCase], 'pop')
     try:
         pop()
     finally:
         self.setSecurityManager(old)
     self.assert_(sm.calls)
Beispiel #3
0
 def test_pop_validates(self):
     from AccessControl.ZopeGuards import get_list_pop
     sm = SecurityManager()
     old = self.setSecurityManager(sm)
     pop = get_list_pop([GuardTestCase], 'pop')
     try:
         pop()
     finally:
         self.setSecurityManager(old)
     self.assert_(sm.calls)
 def test_pop_validates(self):
     from AccessControl.ZopeGuards import get_list_pop
     sm = SecurityManager()
     old = self.setSecurityManager(sm)
     pop = get_list_pop([GuardTestCase], 'pop')
     try:
         pop()
     finally:
         self.setSecurityManager(old)
     self.assertTrue(sm.calls)
Beispiel #5
0
 def test_pop_raises(self):
     from AccessControl.ZopeGuards import get_list_pop
     pop = get_list_pop([], 'pop')
     self.assertRaises(IndexError, pop)
Beispiel #6
0
 def test_pop_simple(self):
     from AccessControl.ZopeGuards import get_list_pop
     pop = get_list_pop(['foo', 'bar', 'baz'], 'pop')
     self.assertEqual(pop(), 'baz')
     self.assertEqual(pop(0), 'foo')
 def test_pop_raises(self):
     from AccessControl.ZopeGuards import get_list_pop
     pop = get_list_pop([], 'pop')
     self.assertRaises(IndexError, pop)
 def test_pop_simple(self):
     from AccessControl.ZopeGuards import get_list_pop
     pop = get_list_pop(['foo', 'bar', 'baz'], 'pop')
     self.assertEqual(pop(), 'baz')
     self.assertEqual(pop(0), 'foo')
Beispiel #9
0
 def test_pop_raises(self):
     pop = get_list_pop([], 'pop')
     self.assertRaises(IndexError, pop)
Beispiel #10
0
 def test_pop_simple(self):
     pop = get_list_pop(['foo', 'bar', 'baz'], 'pop')
     self.assertEqual(pop(), 'baz')
     self.assertEqual(pop(0), 'foo')
Beispiel #11
0
    def test_pop_simple(self):
        from AccessControl.ZopeGuards import get_list_pop

        pop = get_list_pop(["foo", "bar", "baz"], "pop")
        self.assertEqual(pop(), "baz")
        self.assertEqual(pop(0), "foo")
Beispiel #12
0
 def test_pop_raises(self):
     pop = get_list_pop([], 'pop')
     self.assertRaises(IndexError, pop)
Beispiel #13
0
 def test_pop_simple(self):
     pop = get_list_pop(['foo', 'bar', 'baz'], 'pop')
     self.assertEqual(pop(), 'baz')
     self.assertEqual(pop(0), 'foo')