Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(37)  |  Call(37)  |  Derive(0)  |  Import(0)

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/tests/test_security.py   Products.Archetypes(Download)
    def afterSetUp(self):
        ATSiteTestCase.afterSetUp(self)
        self.setRoles(['Manager'])
        self.portal.invokeFactory('Folder', 'test_folder_')
        self.folder = self.portal.test_folder_
    def test_attribute_access_no_perm(self):
        self.setRoles(['Manager'])
        p = self.inst
        p.manage_permission(TestView, roles=['Manager'], acquire=0)
        self.setRoles([])
    def DISABLEDtest_method_access_no_perm(self):
        # XXX Fails in my Zope from Zope-2_7-branch, but works with
        # Zope from trunk.
        self.setRoles(['Manager'])
        p = self.inst
        p.manage_permission(TestView, roles=['Manager'], acquire=0)
        self.setRoles([])

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/tests/test_security.py   Products.Archetypes(Download)
    def afterSetUp(self):
        ATSiteTestCase.afterSetUp(self)
        self.setRoles(['Manager'])
        self.portal.invokeFactory('Folder', 'test_folder_')
        self.folder = self.portal.test_folder_
    def test_attribute_access_no_perm(self):
        self.setRoles(['Manager'])
        p = self.inst
        p.manage_permission(TestView, roles=['Manager'], acquire=0)
        self.setRoles([])
    def DISABLEDtest_method_access_no_perm(self):
        # XXX Fails in my Zope from Zope-2_7-branch, but works with
        # Zope from trunk.
        self.setRoles(['Manager'])
        p = self.inst
        p.manage_permission(TestView, roles=['Manager'], acquire=0)
        self.setRoles([])

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/tests/test_copying.py   Products.Archetypes(Download)
    def afterSetUp(self):
        ATSiteTestCase.afterSetUp(self)
        self.setRoles(['Manager'])
 
        imgpath = os.path.join(PACKAGE_HOME, os.pardir, 'tool.gif')

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/tests/test_copying.py   Products.Archetypes(Download)
    def afterSetUp(self):
        ATSiteTestCase.afterSetUp(self)
        self.setRoles(['Manager'])
 
        imgpath = os.path.join(PACKAGE_HOME, os.pardir, 'tool.gif')

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/tests/test_metadata.py   Products.Archetypes(Download)
                                       context=self.portal, schema=schema)
        # to enable overrideDiscussionFor
        self.setRoles(['Manager'])
        self.makeDummy()
        addMetadataTo(self._dummy)
 
        # to enable overrideDiscussionFor
        self.setRoles(['Manager'])
 
        parent = mkDummyInContext(klass=DummyFolder, oid='parent',
    def afterSetUp(self):
        portal = self.portal
 
        # to enable overrideDiscussionFor
        self.setRoles(['Manager'])

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/tests/test_metadata.py   Products.Archetypes(Download)
                                       context=self.portal, schema=schema)
        # to enable overrideDiscussionFor
        self.setRoles(['Manager'])
        self.makeDummy()
        addMetadataTo(self._dummy)
 
        # to enable overrideDiscussionFor
        self.setRoles(['Manager'])
 
        parent = mkDummyInContext(klass=DummyFolder, oid='parent',
    def afterSetUp(self):
        portal = self.portal
 
        # to enable overrideDiscussionFor
        self.setRoles(['Manager'])

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/tests/test_index.py   Products.Archetypes(Download)
    def afterSetUp(self):
        self.setRoles(['Manager'])
        self.inst = makeContent(self.portal,
                                portal_type='SimpleType',
                                id='simple_type')
    def afterSetUp(self):
        self.setRoles(['Manager'])
        self.inst = makeContent(self.portal,
                                portal_type='SimpleType',
                                id='simple_type')
    def afterSetUp(self):
        self.setRoles(['Manager'])
        manage_addZCatalog(self.portal, 'zope_catalog', 'Zope Catalog')
        self.portal.zope_catalog.addIndex('getId', 'FieldIndex')
        self.tool = self.portal.archetype_tool

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/tests/test_index.py   Products.Archetypes(Download)
    def afterSetUp(self):
        self.setRoles(['Manager'])
        self.inst = makeContent(self.portal,
                                portal_type='SimpleType',
                                id='simple_type')
    def afterSetUp(self):
        self.setRoles(['Manager'])
        self.inst = makeContent(self.portal,
                                portal_type='SimpleType',
                                id='simple_type')
    def afterSetUp(self):
        self.setRoles(['Manager'])
        manage_addZCatalog(self.portal, 'zope_catalog', 'Zope Catalog')
        self.portal.zope_catalog.addIndex('getId', 'FieldIndex')
        self.tool = self.portal.archetype_tool

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/tests/test_baseobject.py   Products.Archetypes(Download)
        self.assertRaises(Unauthorized, guarded_getattr, dummy, 'content_type')
 
        self.setRoles(('Manager',))
        # dummy.content_type in a Python Script
        self.assertEqual(guarded_getattr(dummy, 'content_type'), 'text/plain')

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/tests/test_baseobject.py   Products.Archetypes(Download)
        self.assertRaises(Unauthorized, guarded_getattr, dummy, 'content_type')
 
        self.setRoles(('Manager',))
        # dummy.content_type in a Python Script
        self.assertEqual(guarded_getattr(dummy, 'content_type'), 'text/plain')

  1 | 2  Next