Did I find the right examples for you? yes no

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

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testCatalogTool.py   Products.CMFPlone(Download)
    def testFolderTitleIsUpdatedOnFolderTitleChange(self):
        # The bug in fact talks about folder_rename
        title = 'Test Folder - Snooze!'
        foo_path = '/'.join(self.folder.foo.getPhysicalPath())
        self.setRequestMethod('POST')
        transaction.savepoint(optimistic=True)  # make rename work
        foo_path = '/'.join(self.folder.foo.getPhysicalPath())
        self.setRequestMethod('POST')
        self.folder.folder_rename(paths=[foo_path], new_ids=['bar'],
                                  new_titles=[title])
        self.app.REQUEST.set('paths', [doc_path])
        # folder_delete requires a non-GET request
        self.setRequestMethod('POST')
        self.folder.folder_delete()
        self.setRequestMethod('GET')

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testCatalogTool.py   Products.CMFPlone(Download)
    def testFolderTitleIsUpdatedOnFolderTitleChange(self):
        # The bug in fact talks about folder_rename
        title = 'Test Folder - Snooze!'
        foo_path = '/'.join(self.folder.foo.getPhysicalPath())
        self.setRequestMethod('POST')
        transaction.savepoint(optimistic=True)  # make rename work
        foo_path = '/'.join(self.folder.foo.getPhysicalPath())
        self.setRequestMethod('POST')
        self.folder.folder_rename(paths=[foo_path], new_ids=['bar'],
                                  new_titles=[title])
        self.app.REQUEST.set('paths', [doc_path])
        # folder_delete requires a non-GET request
        self.setRequestMethod('POST')
        self.folder.folder_delete()
        self.setRequestMethod('GET')

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testFolderButtons.py   Products.CMFPlone(Download)
        self.folder.bar.invokeFactory('Document', id='doc2')
        # folder_rename requires a non-GET request
        self.setRequestMethod('POST')
        self.setupAuthenticator()
 
    def testGETRaises(self):
        # folder_rename requires a non-GET request and will fail otherwise
        self.setRequestMethod('GET')
        doc1_path = '/'.join(self.folder.foo.doc1.getPhysicalPath())
        self.assertRaises(Forbidden, self.folder.folder_rename,
        self.folder._setObject('no_delete', undeletable)
        # folder_delete requires a non-GET request
        self.setRequestMethod('POST')
        self.setupAuthenticator()
 
    def testGETRaisesUnauthorized(self):
        # folder_delete requires a non-GET request and will fail otherwise
        self.setRequestMethod('GET')
        self.assertRaises(Forbidden, self.folder.folder_delete)
 
                                         ['Reviewer'], [])
        # folder_publish requires a non-GET request
        self.setRequestMethod('POST')
 
    def testFolderPublishing(self):

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testFolderButtons.py   Products.CMFPlone(Download)
        self.folder.bar.invokeFactory('Document', id='doc2')
        # folder_rename requires a non-GET request
        self.setRequestMethod('POST')
        self.setupAuthenticator()
 
    def testGETRaises(self):
        # folder_rename requires a non-GET request and will fail otherwise
        self.setRequestMethod('GET')
        doc1_path = '/'.join(self.folder.foo.doc1.getPhysicalPath())
        self.assertRaises(Forbidden, self.folder.folder_rename,
        self.folder._setObject('no_delete', undeletable)
        # folder_delete requires a non-GET request
        self.setRequestMethod('POST')
        self.setupAuthenticator()
 
    def testGETRaisesUnauthorized(self):
        # folder_delete requires a non-GET request and will fail otherwise
        self.setRequestMethod('GET')
        self.assertRaises(Forbidden, self.folder.folder_delete)
 
                                         ['Reviewer'], [])
        # folder_publish requires a non-GET request
        self.setRequestMethod('POST')
 
    def testFolderPublishing(self):

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testContentSecurity.py   Products.CMFPlone(Download)
        self.setupAuthenticator()
        folder = self.membership.getHomeFolder('user1')
        self.setRequestMethod('POST')
        folder.manage_addLocalRoles('user2', ('Owner',))
        self.setRequestMethod('GET')
        self.login('user1')
        self.setupAuthenticator()
        self.setRequestMethod('POST')
        folder = self.membership.getHomeFolder('user1')
        self.setRequestMethod('GET')

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testContentSecurity.py   Products.CMFPlone(Download)
        self.setupAuthenticator()
        folder = self.membership.getHomeFolder('user1')
        self.setRequestMethod('POST')
        folder.manage_addLocalRoles('user2', ('Owner',))
        self.setRequestMethod('GET')
        self.login('user1')
        self.setupAuthenticator()
        self.setRequestMethod('POST')
        folder = self.membership.getHomeFolder('user1')
        self.setRequestMethod('GET')

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testContentPublishing.py   Products.CMFPlone(Download)
 
        # folder_publish requires a non-GET request
        self.setRequestMethod('POST')
        self.folder.folder_publish(workflow_action='publish',
                                   paths=paths,
 
        # folder_publish requires a non-GET request
        self.setRequestMethod('POST')
        self.folder.folder_publish(workflow_action='publish',
                                   paths=paths,
 
        # folder_publish requires a non-GET request
        self.setRequestMethod('POST')
        self.folder.folder_publish(workflow_action='publish',
                                   paths=paths,

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testContentPublishing.py   Products.CMFPlone(Download)
 
        # folder_publish requires a non-GET request
        self.setRequestMethod('POST')
        self.folder.folder_publish(workflow_action='publish',
                                   paths=paths,
 
        # folder_publish requires a non-GET request
        self.setRequestMethod('POST')
        self.folder.folder_publish(workflow_action='publish',
                                   paths=paths,
 
        # folder_publish requires a non-GET request
        self.setRequestMethod('POST')
        self.folder.folder_publish(workflow_action='publish',
                                   paths=paths,

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testControlPanelScripts.py   Products.CMFPlone(Download)
    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,

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testControlPanelScripts.py   Products.CMFPlone(Download)
    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  Next