コード例 #1
0
    def afterSetUp(self):
        """ Adding an OAIServer, a ZCatalog and a ZCatalogHarvester

        """
        manage_addZCatalog(self.app, 'catalog', 'Catalog')
        manage_addOAIServer(self.app, 'oai', title=u'OAI Server')

        manage_addFolder(self.app, 'folder', 'Folder')
        self.app.folder.description = u'Some descr'

        manage_addFolder(self.app, 'folder1', 'Folder1')
        self.app.folder1.description = u'Some descr111'

        self.app.catalog.catalog_object(self.app.folder,
                                        self.app.folder.absolute_url(1))
        self.app.catalog.catalog_object(self.app.folder1,
                                        self.app.folder1.absolute_url(1))

        manage_addZCatalogHarvester(self.app.oai, 'harvester',
                                    title=u'Harvester',
                                    search_meta_types=Folder.meta_type)

        self.server = startZServer()
        self.server_url = 'http://%s:%s/' % (self.server[0],
                                             str(self.server[1]))
コード例 #2
0
    def test_basic(self):
        """ """
        manage_addOAIServer(self.app, 'oai_server', title=u'OAI Server')
        self.assertTrue(hasattr(self.app, 'oai_server'))

        manage_addZCatalogHarvester(self.app.oai_server, 'harv',
                            title=u'Harvester', search_meta_types='Folder')
        self.assertTrue(hasattr(self.app.oai_server, 'harv'))
コード例 #3
0
ファイル: test_OAIServer.py プロジェクト: eaudeweb/naaya
 def test_basic(self):
     """ """
     manage_addOAIServer(self.app, 'oai_server', title=u'OAI Server')
     self.assertTrue(hasattr(self.app, 'oai_server'))