Example #1
0
 def getServer(self):
     directory = os.path.dirname(__file__)
     fake1 = os.path.join(directory, 'fake1')
     myserver = fakeclient.FakeClient(fake1)
     metadata_registry = metadata.MetadataRegistry()
     metadata_registry.registerWriter('oai_dc', server.oai_dc_writer)
     return server.Server(myserver, metadata_registry)
Example #2
0
 def setUp(self):
     self._fakeserver = fakeserver.FakeServer()
     metadata_registry = metadata.MetadataRegistry()
     metadata_registry.registerWriter('oai_dc', server.oai_dc_writer)
     metadata_registry.registerReader('oai_dc', metadata.oai_dc_reader)
     self._server = server.Server(self._fakeserver,
                                  metadata_registry,
                                  resumption_batch_size=7)
Example #3
0
 def setUp(self):
     self._fakeserver = fakeserver.FakeServer()
     metadata_registry = metadata.MetadataRegistry()
     metadata_registry.registerWriter('oai_dc', server.oai_dc_writer)
     metadata_registry.registerReader('oai_dc', metadata.oai_dc_reader)
     self._xmlserver = server.XMLTreeServer(
         self._fakeserver,
         metadata_registry,
         nsmap={'cow': 'http://www.cow.com'})
     self._server = server.Server(self._fakeserver,
                                  metadata_registry,
                                  nsmap={'cow': 'http://www.cow.com'})