Did I find the right examples for you? yes no

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

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,

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testRegistrationTool.py   Products.CMFPlone(Download)
    def testCannotRegisterWithRootAdminUsername(self):
        root_user = self.portal.aq_parent.acl_users.users.listUserIds()[0]
        self.assertRaises(ValueError,
                          self.registration.addMember,
                          root_user, 'secret',
    def testJoinWithoutEmailRaisesValueError(self):
        self.assertRaises(ValueError,
                          self.registration.addMember,
                          member_id, 'secret',
                          properties={'username': member_id, 'email': ''})
 
    def testJoinWithBadEmailRaisesValueError(self):
        self.assertRaises(ValueError,
    def testJoinAsExistingMemberRaisesValueError(self):
        self.assertRaises(ValueError,
                          self.registration.addMember,
                          PloneTestCase.default_user, 'secret',
                          properties={'username': 'Dr FooBar',
    def testJoinAsExistingNonMemberUserRaisesValueError(self):
        # http://dev.plone.org/plone/ticket/3221
        self.portal.acl_users._doAddUser(member_id, 'secret', [], [])
        self.assertRaises(ValueError,
                          self.registration.addMember,

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testRegistrationTool.py   Products.CMFPlone(Download)
    def testCannotRegisterWithRootAdminUsername(self):
        root_user = self.portal.aq_parent.acl_users.users.listUserIds()[0]
        self.assertRaises(ValueError,
                          self.registration.addMember,
                          root_user, 'secret',
    def testJoinWithoutEmailRaisesValueError(self):
        self.assertRaises(ValueError,
                          self.registration.addMember,
                          member_id, 'secret',
                          properties={'username': member_id, 'email': ''})
 
    def testJoinWithBadEmailRaisesValueError(self):
        self.assertRaises(ValueError,
    def testJoinAsExistingMemberRaisesValueError(self):
        self.assertRaises(ValueError,
                          self.registration.addMember,
                          PloneTestCase.default_user, 'secret',
                          properties={'username': 'Dr FooBar',
    def testJoinAsExistingNonMemberUserRaisesValueError(self):
        # http://dev.plone.org/plone/ticket/3221
        self.portal.acl_users._doAddUser(member_id, 'secret', [], [])
        self.assertRaises(ValueError,
                          self.registration.addMember,

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testFolderButtons.py   Products.CMFPlone(Download)
    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,
    def testGETRaisesUnauthorized(self):
        # folder_delete requires a non-GET request and will fail otherwise
        self.setRequestMethod('GET')
        self.assertRaises(Forbidden, self.folder.folder_delete)
 
    def testGETRaises(self):
        # folder_rename requires a non-GET request and will fail otherwise
        self.setRequestMethod('GET')
        self.assertRaises(Forbidden, self.folder.folder_publish,
                          'publish', paths=['bogus'])

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testFolderButtons.py   Products.CMFPlone(Download)
    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,
    def testGETRaisesUnauthorized(self):
        # folder_delete requires a non-GET request and will fail otherwise
        self.setRequestMethod('GET')
        self.assertRaises(Forbidden, self.folder.folder_delete)
 
    def testGETRaises(self):
        # folder_rename requires a non-GET request and will fail otherwise
        self.setRequestMethod('GET')
        self.assertRaises(Forbidden, self.folder.folder_publish,
                          'publish', paths=['bogus'])

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testQueryCatalog.py   Products.CMFPlone(Download)
    def testParseError(self):
        # ZCTextIndex raises ParseError
        self.assertRaises(ParseError, self.portal.portal_catalog,
                          SearchableText='-foo')
 
        searchRssView = getMultiAdapter((self.portal, self.app.REQUEST),
                                        name="search_rss")
        self.assertRaises(NotFound, searchRssView)
 

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testQueryCatalog.py   Products.CMFPlone(Download)
    def testParseError(self):
        # ZCTextIndex raises ParseError
        self.assertRaises(ParseError, self.portal.portal_catalog,
                          SearchableText='-foo')
 
        searchRssView = getMultiAdapter((self.portal, self.app.REQUEST),
                                        name="search_rss")
        self.assertRaises(NotFound, searchRssView)
 

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testContentSecurity.py   Products.CMFPlone(Download)
    def testCreateOtherMemberContentFails(self):
        self.login('user1')
        folder = self.membership.getHomeFolder('user2')
        self.assertRaises(ValueError, folder.invokeFactory, 'Document', 'new')
 
    def testCreateRootContentFails(self):
        self.login('user1')
        self.assertRaises(Unauthorized, self.portal.invokeFactory,
        self.login('user2')
        folder = self.membership.getHomeFolder('user1')
        self.assertRaises(Unauthorized, folder.manage_delObjects, ['new'])
 
    def testCreateWithLocalRole(self):
        self.login('user2')
        # This should now raise ValueError
        self.assertRaises(ValueError, folder.subfolder.invokeFactory,
                          'Document', 'new')
 

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testContentSecurity.py   Products.CMFPlone(Download)
    def testCreateOtherMemberContentFails(self):
        self.login('user1')
        folder = self.membership.getHomeFolder('user2')
        self.assertRaises(ValueError, folder.invokeFactory, 'Document', 'new')
 
    def testCreateRootContentFails(self):
        self.login('user1')
        self.assertRaises(Unauthorized, self.portal.invokeFactory,
        self.login('user2')
        folder = self.membership.getHomeFolder('user1')
        self.assertRaises(Unauthorized, folder.manage_delObjects, ['new'])
 
    def testCreateWithLocalRole(self):
        self.login('user2')
        # This should now raise ValueError
        self.assertRaises(ValueError, folder.subfolder.invokeFactory,
                          'Document', 'new')
 

  1 | 2 | 3  Next