Did I find the right examples for you? yes no

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

src/p/r/Products.CMFBibliographyAT-1.1.4.1/Products/CMFBibliographyAT/tests/testBibliographyFolder.py   Products.CMFBibliographyAT(Download)
    def test_FolderCreation(self):
        uf = self.folder
        uf.invokeFactory(type_name = "BibliographyFolder",
                         id = 'test_folder')
        self.failUnless('test_folder' in uf.contentIds())
                        'TrapeMane2002']
        for id in expected_ids:
            self.failUnless(id in bf.contentIds(),
                            'Importing %s failed.' % id)
 
                        'McKay2003']
        for id in expected_ids:
            self.failUnless(id in bf.contentIds(),
                            'Importing %s failed.' % id)
        # Test the annote handling
        self.failUnless(bf['McKay2003'].getAnnote() == 'I really like it.')
        bib_source = bf.restrictedTraverse('@@export').export(format='BibTeX').strip()
        #expected_source = open(setup.BIBTEX_TEST_CITE_KEY, 'r').read().strip()
        self.failUnless(bib_source.startswith('@Book{Esping-Andersen1985'))
 
    # for the folder defaults

src/p/r/Products.CMFBibliographyAT-1.1.4.1/Products/CMFBibliographyAT/tests/testPdfFolder.py   Products.CMFBibliographyAT(Download)
    def test_PdfFolderCreation(self):
        uf = self.folder
        bf = self.getEmptyBibFolder()
        pdf_folder = bf.getPdfFolder()
        self.failUnless('pdfs' in bf.contentIds())
        self.failUnless(pdf_folder.portal_type == 'PDF Folder')
        except ValueError:
            pass
        self.failUnless('test_pdf1' not in pf.contentIds())
 
        pf.allowPdfFileCreation()
        except ValueError:
            pass
        self.failUnless('test_pdf2' in pf.contentIds())
 
        pf.disallowPdfFileCreation()
        except ValueError:
            pass
        self.failUnless('test_pdf3' not in pf.contentIds())
 
        self.purgeBibFolders()

src/p/r/Products.CMFBibliographyAT-1.1.4.1/Products/CMFBibliographyAT/tests/testProductInstall.py   Products.CMFBibliographyAT(Download)
    def testSkinInstallation(self):
        st = self.portal.portal_skins
        self.failUnless('bibliography' in st.objectIds())
 
    def testToolInstalltion(self):
        root = self.portal
        self.failUnless('portal_bibliography' in root.objectIds())
    def testBibtexParserInstallation(self):
        parser = getUtility(IBibliographyParser, name='bibtex')
        self.failUnless(isinstance(parser, BibtexParser))
 
    def testMedlineParserInstallation(self):
        parser = getUtility(IBibliographyParser, name='medline')
        self.failUnless(isinstance(parser, MedlineParser))
    def testBibtexRendererInstallation(self):
        util = getUtility(IBibliographyRenderer, name='bibtex')
        self.failUnless(isinstance(util, BibtexRenderer))
 
 

src/p/r/Products.CMFBibliographyAT-1.1.4.1/Products/CMFBibliographyAT/tests/testReferenceIdCooking.py   Products.CMFBibliographyAT(Download)
        cook_ids_after_bibref_edit = bib_tool.cookIdsAfterBibRefEdit()
 
        self.failUnless(default_idcooker_id == 'etal')
        self.failUnless(use_pids_on_import == True)
        self.failUnless(cook_ids_on_bibref_creation == False)
        self.failUnless(cook_ids_after_bibref_edit == False)
        cook_ids_after_bibref_edit = bib_tool.cookIdsAfterBibRefEdit()
 
        self.failUnless(default_idcooker_id == 'abbrev')
        self.failUnless(use_pids_on_import == False)
        self.failUnless(cook_ids_on_bibref_creation == True)

src/p/r/Products.CMFBibliographyAT-1.1.4.1/Products/CMFBibliographyAT/tests/testDuplicationObjects.py   Products.CMFBibliographyAT(Download)
    def testSiteWideEnableDuplicatesManager(self):
 
        bf = self.getEmptyBibFolder(id='dup_tool_test')
        self.failUnless(bf.getEnableDuplicatesManager())
 
    def testDuplicatesFolder(self):
        bf = self.getEmptyBibFolder(id='dup_bf')
        bf.getDuplicatesFolder()
        self.failUnless('duplicates' in bf.contentIds())
        self.failUnless(bf.duplicates.portal_type == 'DuplicatesBibliographyFolder')
        self.failUnless('duplicates' in bf.contentIds())
        self.failUnless(bf.duplicates.portal_type == 'DuplicatesBibliographyFolder')
        self.failUnless(bf.duplicates.getReferenceIdCookingMethod() == 'uid')
        self.failUnless(bf.duplicates.getCookIdsAfterBibRefEdit())
 

src/p/r/Products.PloneBooking-3.0.0a2/Products/PloneBooking/tests/PloneBookingTestCase.py   Products.PloneBooking(Download)
    def createEmptyBookableObject(self, container, content_id='booking', wf_action=None):
        # return an empty bookable object
        container.invokeFactory(type_name='BookableObject', id=content_id)
        self.failUnless(content_id in container.objectIds())
        self.bookable_object = getattr(container, content_id)
    def createEmptyBooking(self, container, content_id='booking'):
        # return empty booking
        container.invokeFactory(type_name='Booking', id=content_id)
        self.failUnless(content_id in container.objectIds())
        self.booking = getattr(container, content_id)
    def createEmptyBookingCenter(self, container, content_id='booking_center'):
        # return an empty booking center
        container.invokeFactory(type_name='BookingCenter', id=content_id)
        self.failUnless(content_id in container.objectIds())
        self.booking_center = getattr(container, content_id)
        """
        booking.edit(startDate=start_date, endDate=end_date)
        self.failUnless(booking.getStartDate() == start_date,
                        "Value is %s" % booking.getStartDate())
        self.failUnless(booking.getEndDate() == end_date,

src/p/r/Products.CMFBibliographyAT-1.1.4.1/Products/CMFBibliographyAT/tests/testBibtexParsing.py   Products.CMFBibliographyAT(Download)
                    'firstname' : 'Pedro',
                    'lastname'  : 'Carneiro'}
        self.failUnless( len( result['authors'] ) == 2 )
        author1 = result['authors'][0]
        self.failUnless(author1['middlename'] == carneiro['middlename'])
        self.failUnless(author1['firstname'] == carneiro['firstname'])
        self.failUnless(author1['lastname'] == carneiro['lastname'])
        author2 = result['authors'][1]
        self.failUnless(author2['middlename'] == heckman['middlename'])

src/p/r/Products.CMFBibliographyAT-1.1.4.1/Products/CMFBibliographyAT/tests/testRISParser.py   Products.CMFBibliographyAT(Download)
    def test_Parser(self):
        source = open(setup.RIS_SOURCE, 'r').read()
        p = RISParser()
        entries = p.getEntries(source)
        self.failUnless( len(entries) == 1 )
        self.failUnless( entries[0]['title'] == 'Markets and Municipalities: A Study of the Behavior of the Danish Municipalities' )
        self.failUnless( entries[0]['pages'] == '79--102' )
        self.failUnless( len( entries[0]['authors'] ) == 2 )
        self.failUnless( entries[0]['authors'][0]['lastname'] == 'Christoffersen' )

src/p/r/Products.CMFBibliographyAT-1.1.4.1/Products/CMFBibliographyAT/tests/testMemberAuthorReferences.py   Products.CMFBibliographyAT(Download)
        bf.invokeFactory(type_name = 'ArticleReference',
                         id = 'test_article')
        self.failUnless('test_article' in bf.contentIds())
        article = bf.test_article
 
                             'Last2, First2 Middle2 and Lastname, Firstname')
 
        self.failUnless(article.Authors())
 
    def testEntryLocalRoles(self):
        bf.invokeFactory(type_name = 'ArticleReference',
                         id = 'test_article')
        self.failUnless('test_article' in bf.contentIds())
        article = bf.test_article
 

src/p/r/Products.CMFBibliographyAT-1.1.4.1/Products/CMFBibliographyAT/tests/testReferenceTypes.py   Products.CMFBibliographyAT(Download)
    def test_ArticleCreation(self):
        bf = self.folder.bib_folder
        bf.invokeFactory(type_name = 'ArticleReference',
                         id = 'test_article')
        self.failUnless('test_article' in bf.contentIds())
        o2 = entry.getPdfFolder()
        self.assertEqual(o1, o2)
        self.failUnless('pdfs' in bf.contentIds())
        folder_type = o1.portal_type
        self.assertEqual(folder_type, 'PDF Folder')

  1 | 2  Next