def test_remote_search(self):
     """InvenioConnector - remote search."""
     server = InvenioConnector(CFG_SITE_URL)
     result = server.search(p='ellis', of='id')
     self.assertTrue(len(list(result)) > 0,
                     'did not get remote search results from '
                     'http://demo.invenio-software.org')
예제 #2
0
 def test_remote_search(self):
     """InvenioConnector - remote search."""
     server = InvenioConnector(CFG_SITE_URL)
     result = server.search(p='ellis', of='id')
     self.assertTrue(
         len(list(result)) > 0, 'did not get remote search results from '
         'http://demo.inveniosoftware.org')
    def _test_search_remote_restricted_collections(self):
        """InvenioConnector - remote restricted collection search"""
        server = InvenioConnector(CFG_SITE_URL)
        search_params = dict(p='LBL-28106', c=['Theses'], of='id',
                             ssl_verify=False)
        self.assertRaises(InvenioConnectorAuthError, server.search,
                          **search_params)

        server = InvenioConnector(CFG_SITE_SECURE_URL, user='******',
                                  password='******')
        result = server.search(p='LBL-28106', c=['Theses'], of='id',
                               ssl_verify=False)
        self.assertTrue(len(list(result)) > 0,
                        'did not get restricted collection search results.')
예제 #4
0
    def _test_search_remote_restricted_collections(self):
        """InvenioConnector - remote restricted collection search"""
        server = InvenioConnector(CFG_SITE_URL)
        search_params = dict(p='LBL-28106',
                             c=['Theses'],
                             of='id',
                             ssl_verify=False)
        self.assertRaises(InvenioConnectorAuthError, server.search,
                          **search_params)

        server = InvenioConnector(CFG_SITE_SECURE_URL,
                                  user='******',
                                  password='******')
        result = server.search(p='LBL-28106',
                               c=['Theses'],
                               of='id',
                               ssl_verify=False)
        self.assertTrue(
            len(list(result)) > 0,
            'did not get restricted collection search results.')
 def test_search_collections(self):
     """InvenioConnector - collection search"""
     server = InvenioConnector(CFG_SITE_URL)
     result = server.search(p='', c=['Books'], of='id')
     self.assertTrue(len(list(result)) > 0,
                     'did not get collection search results.')
예제 #6
0
 def test_search_collections(self):
     """InvenioConnector - collection search"""
     server = InvenioConnector(CFG_SITE_URL)
     result = server.search(p='', c=['Books'], of='id')
     self.assertTrue(
         len(list(result)) > 0, 'did not get collection search results.')