Did I find the right examples for you? yes no

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

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testCatalogTool.py   Products.CMFPlone(Download)
    def testSearchableTextIsZCTextIndex(self):
        # SearchableText index should be a ZCTextIndex
        itype = self.catalog.Indexes['SearchableText'].__class__.__name__
        self.assertEqual(itype, 'ZCTextIndex')
 
    def testDescriptionIsZCTextIndex(self):
        # Description index should be a ZCTextIndex
        itype = self.catalog.Indexes['Description'].__class__.__name__
        self.assertEqual(itype, 'ZCTextIndex')
    def testTitleIsZCTextIndex(self):
        # Title index should be a ZCTextIndex
        itype = self.catalog.Indexes['Title'].__class__.__name__
        self.assertEqual(itype, 'ZCTextIndex')
 
    def testPloneLexiconIsZCTextLexicon(self):
        # Lexicon should be a ZCTextIndex lexicon
        self.assertTrue(hasattr(aq_base(self.catalog), 'plone_lexicon'))
        self.assertEqual(self.catalog.plone_lexicon.meta_type,\
    def testPathIsExtendedPathIndex(self):
        # path index should be an ExtendedPathIndex
        self.assertEqual(self.catalog.Indexes['path'].__class__.__name__,
                         'ExtendedPathIndex')
 

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testCatalogTool.py   Products.CMFPlone(Download)
    def testSearchableTextIsZCTextIndex(self):
        # SearchableText index should be a ZCTextIndex
        itype = self.catalog.Indexes['SearchableText'].__class__.__name__
        self.assertEqual(itype, 'ZCTextIndex')
 
    def testDescriptionIsZCTextIndex(self):
        # Description index should be a ZCTextIndex
        itype = self.catalog.Indexes['Description'].__class__.__name__
        self.assertEqual(itype, 'ZCTextIndex')
    def testTitleIsZCTextIndex(self):
        # Title index should be a ZCTextIndex
        itype = self.catalog.Indexes['Title'].__class__.__name__
        self.assertEqual(itype, 'ZCTextIndex')
 
    def testPloneLexiconIsZCTextLexicon(self):
        # Lexicon should be a ZCTextIndex lexicon
        self.assertTrue(hasattr(aq_base(self.catalog), 'plone_lexicon'))
        self.assertEqual(self.catalog.plone_lexicon.meta_type,\
    def testPathIsExtendedPathIndex(self):
        # path index should be an ExtendedPathIndex
        self.assertEqual(self.catalog.Indexes['path'].__class__.__name__,
                         'ExtendedPathIndex')
 

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testWebDAV.py   Products.CMFPlone(Download)
        items = dict(default.propertyItems())
        self.assertTrue('displayname' in items.keys())
        self.assertEqual(items['displayname'], ptool.title)
 
 
                                basic=self.basic_auth)
 
        self.assertEqual(response.getStatus(), 201)
        self.assertTrue('new_html' in self.folder)
        self.assertEqual(self.folder.new_html.portal_type, 'Document')
        self.assertEqual(self.folder.new_html.EditableBody(), html)
                                basic=self.basic_auth)
 
        self.assertEqual(response.getStatus(), 201)
        self.assertTrue('test.rst' in self.folder)
        self.assertEqual(self.folder['test.rst'].portal_type, 'Document')

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testWebDAV.py   Products.CMFPlone(Download)
        items = dict(default.propertyItems())
        self.assertTrue('displayname' in items.keys())
        self.assertEqual(items['displayname'], ptool.title)
 
 
                                basic=self.basic_auth)
 
        self.assertEqual(response.getStatus(), 201)
        self.assertTrue('new_html' in self.folder)
        self.assertEqual(self.folder.new_html.portal_type, 'Document')
        self.assertEqual(self.folder.new_html.EditableBody(), html)
                                basic=self.basic_auth)
 
        self.assertEqual(response.getStatus(), 201)
        self.assertTrue('test.rst' in self.folder)
        self.assertEqual(self.folder['test.rst'].portal_type, 'Document')

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testNavTree.py   Products.CMFPlone(Download)
    def testGetFromRoot(self):
        tree = buildFolderTree(self.portal)['children']
        rootPath = '/'.join(self.portal.getPhysicalPath())
        self.assertEqual(len(tree), 6)
        self.assertEqual(tree[0]['item'].getPath(), rootPath + '/doc1')
        self.assertEqual(tree[1]['item'].getPath(), rootPath + '/doc2')
        self.assertEqual(tree[2]['item'].getPath(), rootPath + '/doc3')
        self.assertEqual(tree[3]['item'].getPath(), rootPath + '/folder1')

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testNavTree.py   Products.CMFPlone(Download)
    def testGetFromRoot(self):
        tree = buildFolderTree(self.portal)['children']
        rootPath = '/'.join(self.portal.getPhysicalPath())
        self.assertEqual(len(tree), 6)
        self.assertEqual(tree[0]['item'].getPath(), rootPath + '/doc1')
        self.assertEqual(tree[1]['item'].getPath(), rootPath + '/doc2')
        self.assertEqual(tree[2]['item'].getPath(), rootPath + '/doc3')
        self.assertEqual(tree[3]['item'].getPath(), rootPath + '/folder1')

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testPloneTool.py   Products.CMFPlone(Download)
        self.folder.invokeFactory('File', id='file')
        self.folder.file.edit(file=dummy.File('foo.zip'))
        self.assertEqual(self.folder.file.Format(), 'application/zip')
        self.assertEqual(self.folder.file.getFile().content_type,
                         'application/zip')
        # Changing the format should be reflected in content_type property
        self.utils.editMetadata(self.folder.file, format='image/gif')
        self.assertEqual(self.folder.file.Format(), 'image/gif')
        self.assertEqual(self.folder.file.getFile().content_type, 'image/gif')
        self.folder.invokeFactory('Image', id='image')
        self.folder.image.edit(file=dummy.Image('foo.zip'))
        self.assertEqual(self.folder.image.Format(), 'application/zip')
        self.assertEqual(self.folder.image.getImage().content_type,
                        'application/zip')

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testPloneTool.py   Products.CMFPlone(Download)
        self.folder.invokeFactory('File', id='file')
        self.folder.file.edit(file=dummy.File('foo.zip'))
        self.assertEqual(self.folder.file.Format(), 'application/zip')
        self.assertEqual(self.folder.file.getFile().content_type,
                         'application/zip')
        # Changing the format should be reflected in content_type property
        self.utils.editMetadata(self.folder.file, format='image/gif')
        self.assertEqual(self.folder.file.Format(), 'image/gif')
        self.assertEqual(self.folder.file.getFile().content_type, 'image/gif')
        self.folder.invokeFactory('Image', id='image')
        self.folder.image.edit(file=dummy.Image('foo.zip'))
        self.assertEqual(self.folder.image.Format(), 'application/zip')
        self.assertEqual(self.folder.image.getImage().content_type,
                        'application/zip')

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/tests/testFolderButtons.py   Products.CMFPlone(Download)
                                  new_titles=[title])
        obj = self.folder.foo.doc1
        self.assertEqual(obj.Title(), title)
 
    def testCatalogTitleIsUpdatedOnFolderTitleChange(self):
        self.assertTrue(results)
        for result in results:
            self.assertEqual(result.Title, title)
            self.assertEqual(result.id, 'doc1')
 
        self.folder.folder_rename(paths=[doc_path], new_ids=['baz'],
                                  new_titles=[title])
        self.assertEqual(getattr(self.folder.foo, 'doc1', None), None)
        self.assertTrue(getattr(self.folder.foo, 'baz', None) is not None)
        self.assertEqual(self.folder.foo.baz.Title(), title)

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/tests/testFolderButtons.py   Products.CMFPlone(Download)
                                  new_titles=[title])
        obj = self.folder.foo.doc1
        self.assertEqual(obj.Title(), title)
 
    def testCatalogTitleIsUpdatedOnFolderTitleChange(self):
        self.assertTrue(results)
        for result in results:
            self.assertEqual(result.Title, title)
            self.assertEqual(result.id, 'doc1')
 
        self.folder.folder_rename(paths=[doc_path], new_ids=['baz'],
                                  new_titles=[title])
        self.assertEqual(getattr(self.folder.foo, 'doc1', None), None)
        self.assertTrue(getattr(self.folder.foo, 'baz', None) is not None)
        self.assertEqual(self.folder.foo.baz.Title(), title)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8  Next