X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/010d715dad6709bf4f67e3b04e3f669fed45bb56..76849e4b3dcc3305edbe86b794b04a0bf4a8467c:/apps/oai/tests/oaipmhapi.py diff --git a/apps/oai/tests/oaipmhapi.py b/apps/oai/tests/oaipmhapi.py index e56786232..b4947fe3d 100644 --- a/apps/oai/tests/oaipmhapi.py +++ b/apps/oai/tests/oaipmhapi.py @@ -19,8 +19,9 @@ class BookMetadataTest(WLTestCase): xml = path.join(path.dirname(__file__), 'files/antygona.xml') self.book2 = models.Book.from_xml_file(xml) - self.catalogue = Catalogue() mr = MetadataRegistry() + self.catalogue = Catalogue(mr) + mr.registerWriter('oai_dc', oai_dc_writer) nsmap = {'oai_dc': NS_OAIDC, 'dc': NS_DC, 'xsi': NS_XSI} self.xml = XMLTreeServer(self.catalogue, mr, nsmap) @@ -28,10 +29,7 @@ class BookMetadataTest(WLTestCase): def test_get_record(self): sch = self.xml.getRecord(identifier='lubie-kiedy-kobieta', metadataPrefix='oai_dc') - etree.dump(sch.getroot()) sch = self.xml.listRecords(metadataPrefix='oai_dc') - etree.dump(sch.getroot()) def test_selecting(self): records, token = self.catalogue.listRecords(**{'set': 'epoch:starozytnosc'}) - print records