Did I find the right examples for you? yes no

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

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testMigrationTool.py   Products.CMFPlone(Download)
    def testMigrationNeedsUpgrading(self):
        self.assertFalse(self.migration.needUpgrading(),
                    'Migration needs upgrading')
 
    def testMigrationNeedsUpdateRole(self):
        self.assertFalse(self.migration.needUpdateRole(),
                    'Migration needs role update')
 
    def testMigrationNeedsRecatalog(self):
        self.assertFalse(self.migration.needRecatalog(),

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testMigrationTool.py   Products.CMFPlone(Download)
    def testMigrationNeedsUpgrading(self):
        self.assertFalse(self.migration.needUpgrading(),
                    'Migration needs upgrading')
 
    def testMigrationNeedsUpdateRole(self):
        self.assertFalse(self.migration.needUpdateRole(),
                    'Migration needs role update')
 
    def testMigrationNeedsRecatalog(self):
        self.assertFalse(self.migration.needRecatalog(),

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testPloneTool.py   Products.CMFPlone(Download)
            self.assertTrue(val(address), '%s should validate' % address)
        for address in invalidInputs:
            self.assertFalse(val(address), '%s should fail' % address)
 
    def testvalidateEmailAddresses(self):
            self.assertTrue(val(address), '%s should validate' % address)
        for address in invalidInputs:
            self.assertFalse(val(address), '%s should fail' % address)
 
    def testEditFormatMetadataOfFile(self):
        self.assertTrue('Folder' in wl)
        self.assertTrue('Topic' in wl)
        self.assertFalse('ATReferenceCriterion' in wl)
 
    def testGetUserFriendlyTypes(self):

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testPloneTool.py   Products.CMFPlone(Download)
            self.assertTrue(val(address), '%s should validate' % address)
        for address in invalidInputs:
            self.assertFalse(val(address), '%s should fail' % address)
 
    def testvalidateEmailAddresses(self):
            self.assertTrue(val(address), '%s should validate' % address)
        for address in invalidInputs:
            self.assertFalse(val(address), '%s should fail' % address)
 
    def testEditFormatMetadataOfFile(self):
        self.assertTrue('Folder' in wl)
        self.assertTrue('Topic' in wl)
        self.assertFalse('ATReferenceCriterion' in wl)
 
    def testGetUserFriendlyTypes(self):

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testCatalogTool.py   Products.CMFPlone(Download)
    def testExpiresDateNotInSchema(self):
        # ExpirationDate column should be in catalog schema
        self.assertFalse('ExpiresDate' in self.catalog.schema())
 
    def testIs_Default_PageIsBooleanIndex(self):
        # Everything in subfolder should be invisible
        self.login(user2)
        self.assertFalse(self.catalog(SearchableText='bar'))
 
    def testSearchIgnoreAccents(self):
        self.folder.foo.setTitle(title)
        #Title is a TextIndex
        self.assertFalse(self.catalog(Title='Snooze'))
 
 
    def testVisibleIsUnindexed(self):
        self.folder._delObject('doc')
        self.assertFalse(self.catalog(getId='doc'))
 
    def testPrivateCanBeFound(self):
    def testPrivateIsUnindexed(self):
        self.workflow.doActionFor(self.folder.doc, 'hide')
        self.folder._delObject('doc')
        self.assertFalse(self.catalog(getId='doc'))
 

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testCatalogTool.py   Products.CMFPlone(Download)
    def testExpiresDateNotInSchema(self):
        # ExpirationDate column should be in catalog schema
        self.assertFalse('ExpiresDate' in self.catalog.schema())
 
    def testIs_Default_PageIsBooleanIndex(self):
        # Everything in subfolder should be invisible
        self.login(user2)
        self.assertFalse(self.catalog(SearchableText='bar'))
 
    def testSearchIgnoreAccents(self):
        self.folder.foo.setTitle(title)
        #Title is a TextIndex
        self.assertFalse(self.catalog(Title='Snooze'))
 
 
    def testVisibleIsUnindexed(self):
        self.folder._delObject('doc')
        self.assertFalse(self.catalog(getId='doc'))
 
    def testPrivateCanBeFound(self):
    def testPrivateIsUnindexed(self):
        self.workflow.doActionFor(self.folder.doc, 'hide')
        self.folder._delObject('doc')
        self.assertFalse(self.catalog(getId='doc'))
 

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testPloneView.py   Products.CMFPlone(Download)
    def testIsStructuralFolderWithNonFolder(self):
        i = dummy.Item()
        self.assertFalse(Plone(i, self.app.REQUEST).isStructuralFolder())
 
    def testIsStructuralFolderWithFolder(self):
    def testIsStructuralFolderWithNonStructuralFolder(self):
        f = dummy.NonStructuralFolder('ns_folder')
        self.assertFalse(Plone(f, self.app.REQUEST).isStructuralFolder())
 
    def testIsDefaultPageInFolder(self):
        view = Plone(self.folder.test, self.app.REQUEST)
        self.assertFalse(view.isDefaultPageInFolder())
        self._invalidateRequestMemoizations()
        view = Plone(self.folder.test, self.app.REQUEST)
        self.assertFalse(view.isFolderOrFolderDefaultPage())
        # Unless we make it the default view
        self.folder.setDefaultPage('test')
        self._invalidateRequestMemoizations()
        view = Plone(self.folder.ns_folder, self.app.REQUEST)
        self.assertFalse(view.isFolderOrFolderDefaultPage())
 
    def testIsPortalOrPortalDefaultPage(self):

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testExternalEditorEnabled.py   Products.CMFPlone(Download)
    def testFailForAnonymous(self):
        self.assertTrue(self.doc.externalEditorEnabled())
        self.logout()
        self.assertFalse(self.doc.externalEditorEnabled())
 
    def testFailOnDisabledMemberProperty(self):
        self.assertTrue(self.doc.externalEditorEnabled())
        member = self.mtool.getAuthenticatedMember()
        member.setMemberProperties({'ext_editor': 0})
        self.assertFalse(self.doc.externalEditorEnabled())
    def testFailOnUnSupportedObjects(self):
        # Structural Folders are not editable by default
        self.assertFalse(self.folder.externalEditorEnabled())
 
    def testFailWithoutUseExtEditPermission(self):
        self.portal.manage_permission('Use external editor',
                                      ('Owner', 'Manager'), 0)
        self.login('user1')
        self.assertFalse(self.doc.externalEditorEnabled())
    def testFailWhenObjectIsLocked(self):
        # Should not show if someone already has a webdav lock on the object
        self.doc.REQUEST.set('BODY', self.lockbody)
        self.doc.LOCK(self.doc.REQUEST, self.doc.REQUEST.RESPONSE)
        self.assertFalse(self.doc.externalEditorEnabled())

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testPloneView.py   Products.CMFPlone(Download)
    def testIsStructuralFolderWithNonFolder(self):
        i = dummy.Item()
        self.assertFalse(Plone(i, self.app.REQUEST).isStructuralFolder())
 
    def testIsStructuralFolderWithFolder(self):
    def testIsStructuralFolderWithNonStructuralFolder(self):
        f = dummy.NonStructuralFolder('ns_folder')
        self.assertFalse(Plone(f, self.app.REQUEST).isStructuralFolder())
 
    def testIsDefaultPageInFolder(self):
        view = Plone(self.folder.test, self.app.REQUEST)
        self.assertFalse(view.isDefaultPageInFolder())
        self._invalidateRequestMemoizations()
        view = Plone(self.folder.test, self.app.REQUEST)
        self.assertFalse(view.isFolderOrFolderDefaultPage())
        # Unless we make it the default view
        self.folder.setDefaultPage('test')
        self._invalidateRequestMemoizations()
        view = Plone(self.folder.ns_folder, self.app.REQUEST)
        self.assertFalse(view.isFolderOrFolderDefaultPage())
 
    def testIsPortalOrPortalDefaultPage(self):

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testExternalEditorEnabled.py   Products.CMFPlone(Download)
    def testFailForAnonymous(self):
        self.assertTrue(self.doc.externalEditorEnabled())
        self.logout()
        self.assertFalse(self.doc.externalEditorEnabled())
 
    def testFailOnDisabledMemberProperty(self):
        self.assertTrue(self.doc.externalEditorEnabled())
        member = self.mtool.getAuthenticatedMember()
        member.setMemberProperties({'ext_editor': 0})
        self.assertFalse(self.doc.externalEditorEnabled())
    def testFailOnUnSupportedObjects(self):
        # Structural Folders are not editable by default
        self.assertFalse(self.folder.externalEditorEnabled())
 
    def testFailWithoutUseExtEditPermission(self):
        self.portal.manage_permission('Use external editor',
                                      ('Owner', 'Manager'), 0)
        self.login('user1')
        self.assertFalse(self.doc.externalEditorEnabled())
    def testFailWhenObjectIsLocked(self):
        # Should not show if someone already has a webdav lock on the object
        self.doc.REQUEST.set('BODY', self.lockbody)
        self.doc.LOCK(self.doc.REQUEST, self.doc.REQUEST.RESPONSE)
        self.assertFalse(self.doc.externalEditorEnabled())

  1 | 2 | 3 | 4 | 5  Next