Did I find the right examples for you? yes no

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

src/p/r/Products.sampleremember-1.1b2/Products/sampleremember/tests/base.py   Products.sampleremember(Download)
        self.admin_member = mtool.getMemberById('admin_member')
 
        self.login('portal_member')
 

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testContentSecurity.py   Products.CMFPlone(Download)
    def testCreateMemberContent(self):
        self.login('user1')
        folder = self.membership.getHomeFolder('user1')
        folder.invokeFactory('Document', id='new')
        self.assertTrue(hasattr(aq_base(folder), 'new'))
 
    def testCreateOtherMemberContentFails(self):
        self.login('user1')
    def testCreateRootContentFails(self):
        self.login('user1')
        self.assertRaises(Unauthorized, self.portal.invokeFactory,
                          'Document', 'new')
 
    def testDeleteMemberContent(self):
        self.login('user1')
    def testDeleteOtherMemberContent(self):
        self.login('user1')
        folder = self.membership.getHomeFolder('user1')
        folder.invokeFactory('Document', id='new')
 

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testContentSecurity.py   Products.CMFPlone(Download)
    def testCreateMemberContent(self):
        self.login('user1')
        folder = self.membership.getHomeFolder('user1')
        folder.invokeFactory('Document', id='new')
        self.assertTrue(hasattr(aq_base(folder), 'new'))
 
    def testCreateOtherMemberContentFails(self):
        self.login('user1')
    def testCreateRootContentFails(self):
        self.login('user1')
        self.assertRaises(Unauthorized, self.portal.invokeFactory,
                          'Document', 'new')
 
    def testDeleteMemberContent(self):
        self.login('user1')
    def testDeleteOtherMemberContent(self):
        self.login('user1')
        folder = self.membership.getHomeFolder('user1')
        folder.invokeFactory('Document', id='new')
 

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testCatalogTool.py   Products.CMFPlone(Download)
        self.loginAsPortalOwner()  # GRUF 3.52
        group.addMember(user2)
        self.login(TEST_USER_NAME)  # Back to normal
        return group2
 
    def testSearchDoesNotReturnDocument(self):
        # Document should not be found when user2 does a search
        self.login(user2)
        self.assertEqual(len(self.catalog(SearchableText='foo')), 0)
 
                                           'type':'group',
                                           'roles':['Owner']}])
        self.login(user2)
        self.assertEqual(self.catalog(SearchableText='aaa')[0].id, 'aaa')
 
                                           'type':'group',
                                           'roles':['Owner']}])
        self.login(user2)
        # Local Role works in subfolder
        self.assertEqual(self.catalog(SearchableText='bbb')[0].id, 'bbb')
            .update_inherit(False)
        # Everything in subfolder should be invisible
        self.login(user2)
        self.assertFalse(self.catalog(SearchableText='bar'))
 

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testCutPasteSecurity.py   Products.CMFPlone(Download)
    def testRenameMemberContent(self):
        self.login('user1')
        folder = self.membership.getHomeFolder('user1')
        folder.invokeFactory('Document', id='testrename')
 
    def testRenameOtherMemberContentFails(self):
        self.login('user1')
        src = self.membership.getHomeFolder('user1')
        src.invokeFactory('Document', id='testrename')
 
        self.login('user2')
    def testCopyMemberContent(self):
        self.login('user1')
        src = self.membership.getHomeFolder('user1')
        src.invokeFactory('Document', id='testcopy')
        src.invokeFactory('Folder', id='dest')
    def testCopyOtherMemberContent(self):
        self.login('user1')
        src = self.membership.getHomeFolder('user1')
        src.invokeFactory('Document', id='testcopy')
 

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testCatalogTool.py   Products.CMFPlone(Download)
        self.loginAsPortalOwner()  # GRUF 3.52
        group.addMember(user2)
        self.login(TEST_USER_NAME)  # Back to normal
        return group2
 
    def testSearchDoesNotReturnDocument(self):
        # Document should not be found when user2 does a search
        self.login(user2)
        self.assertEqual(len(self.catalog(SearchableText='foo')), 0)
 
                                           'type':'group',
                                           'roles':['Owner']}])
        self.login(user2)
        self.assertEqual(self.catalog(SearchableText='aaa')[0].id, 'aaa')
 
                                           'type':'group',
                                           'roles':['Owner']}])
        self.login(user2)
        # Local Role works in subfolder
        self.assertEqual(self.catalog(SearchableText='bbb')[0].id, 'bbb')
            .update_inherit(False)
        # Everything in subfolder should be invisible
        self.login(user2)
        self.assertFalse(self.catalog(SearchableText='bar'))
 

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testCutPasteSecurity.py   Products.CMFPlone(Download)
    def testRenameMemberContent(self):
        self.login('user1')
        folder = self.membership.getHomeFolder('user1')
        folder.invokeFactory('Document', id='testrename')
 
    def testRenameOtherMemberContentFails(self):
        self.login('user1')
        src = self.membership.getHomeFolder('user1')
        src.invokeFactory('Document', id='testrename')
 
        self.login('user2')
    def testCopyMemberContent(self):
        self.login('user1')
        src = self.membership.getHomeFolder('user1')
        src.invokeFactory('Document', id='testcopy')
        src.invokeFactory('Folder', id='dest')
    def testCopyOtherMemberContent(self):
        self.login('user1')
        src = self.membership.getHomeFolder('user1')
        src.invokeFactory('Document', id='testcopy')
 

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testFolderButtons.py   Products.CMFPlone(Download)
    def testFolderPublishing(self):
        # Make sure object gets published
        doc_path = '/'.join(self.folder.foo.doc1.getPhysicalPath())
        self.login('reviewer')
        self.setupAuthenticator()
    def testCatalogIsUpdatedOnFolderPublish(self):
        # Make sure catalog gets updated
        doc_path = '/'.join(self.folder.foo.doc1.getPhysicalPath())
        self.login('reviewer')
        self.setupAuthenticator()
    def testPublishMultiplePaths(self):
        # Make sure publish works for list of paths
        doc1_path = '/'.join(self.folder.foo.doc1.getPhysicalPath())
        doc2_path = '/'.join(self.folder.bar.doc2.getPhysicalPath())
        self.login('reviewer')
        doc2_path = '/'.join(self.folder.bar.doc2.getPhysicalPath())
        paths = [doc1_path, '/garbage/path', doc2_path]
        self.login('reviewer')
        self.setupAuthenticator()
        self.folder.folder_publish('publish', paths=paths)
        # now we perform the transition
        doc1_path = '/'.join(self.folder.foo.doc1.getPhysicalPath())
        self.login('reviewer')
        self.setupAuthenticator()
        self.folder.folder_publish('publish', paths=[doc1_path])

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testFolderButtons.py   Products.CMFPlone(Download)
    def testFolderPublishing(self):
        # Make sure object gets published
        doc_path = '/'.join(self.folder.foo.doc1.getPhysicalPath())
        self.login('reviewer')
        self.setupAuthenticator()
    def testCatalogIsUpdatedOnFolderPublish(self):
        # Make sure catalog gets updated
        doc_path = '/'.join(self.folder.foo.doc1.getPhysicalPath())
        self.login('reviewer')
        self.setupAuthenticator()
    def testPublishMultiplePaths(self):
        # Make sure publish works for list of paths
        doc1_path = '/'.join(self.folder.foo.doc1.getPhysicalPath())
        doc2_path = '/'.join(self.folder.bar.doc2.getPhysicalPath())
        self.login('reviewer')
        doc2_path = '/'.join(self.folder.bar.doc2.getPhysicalPath())
        paths = [doc1_path, '/garbage/path', doc2_path]
        self.login('reviewer')
        self.setupAuthenticator()
        self.folder.folder_publish('publish', paths=paths)
        # now we perform the transition
        doc1_path = '/'.join(self.folder.foo.doc1.getPhysicalPath())
        self.login('reviewer')
        self.setupAuthenticator()
        self.folder.folder_publish('publish', paths=[doc1_path])

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testControlPanelScripts.py   Products.CMFPlone(Download)
        self.portal.portal_membership.addMember('bribri', 'secret',
                                                ['Manager'], [])
        self.login('bribri')
 
    def _onlyPOST(self, path, qstring='', success=200, rpath=None):
    def test_ploneChangePasswordPostOnly(self):
        self.login(TEST_USER_NAME)
        self.setRequestMethod('GET')
        self.assertRaises(Forbidden, self.portal.plone_change_password,
                          current=TEST_USER_PASSWORD, password=TEST_USER_PASSWORD,

  1 | 2 | 3  Next