def testMetsParserPhysical(self):
     """Get Marc physical structure."""
     marc_file = file(marc_file_name)
     marc_parser = MarcParser(marc_file, 'http://doc.rero.ch')
     phys = marc_parser.get_physical_structure()
     desired_out = u"pdf"
     obtained_out = phys[0]['label']
     self.assertEqual(desired_out, obtained_out,  "Physical Structure "\
             "missmatch: '%s' != '%s'" % (desired_out, obtained_out))
Example #2
0
 def testMetsParserPhysical(self):
     """Get Marc physical structure."""
     marc_file = file(marc_file_name)
     marc_parser = MarcParser(marc_file, "http://doc.rero.ch")
     phys = marc_parser.get_physical_structure()
     desired_out = u"pdf"
     obtained_out = phys[0]["label"]
     self.assertEqual(
         desired_out, obtained_out, "Physical Structure " "missmatch: '%s' != '%s'" % (desired_out, obtained_out)
     )
 def testMarcParserMeta(self):
     """Get Marc Metadata."""
     marc_file = file(marc_file_name)
     marc_parser = MarcParser(marc_file, 'http://doc.rero.ch')
     meta = marc_parser.get_metadata()
     title = meta['title']
     ref_title = 'Phylogeography of Populus alba (L.) and Populus tremula '\
         '(L.) in Central Europe: secondary contact and hybridisation during '\
         'recolonisation from disconnected refugia'
     self.assertEqual(title, ref_title, "Metadata has not been "\
         "correctly detected '%s' != '%s'" % (title, ref_title))
Example #4
0
 def testMarcParserMeta(self):
     """Get Marc Metadata."""
     marc_file = file(marc_file_name)
     marc_parser = MarcParser(marc_file, "http://doc.rero.ch")
     meta = marc_parser.get_metadata()
     title = meta["title"]
     ref_title = (
         "Phylogeography of Populus alba (L.) and Populus tremula "
         "(L.) in Central Europe: secondary contact and hybridisation during "
         "recolonisation from disconnected refugia"
     )
     self.assertEqual(
         title, ref_title, "Metadata has not been " "correctly detected '%s' != '%s'" % (title, ref_title)
     )
 def testMarcParserLogical(self):
     """Get Marc logical structure."""
     marc_file = file(marc_file_name)
     marc_parser = MarcParser(marc_file, 'http://doc.rero.ch')
     logic = marc_parser.get_logical_structure()
     self.assertEqual(logic, None)
 def testMarcParser(self):
     """Check MarcParser instance."""
     marc_file = file(marc_file_name)
     marc_parser = MarcParser(marc_file, 'http://doc.rero.ch')
     self.assert_(marc_parser, "Can not create simple MarcParser Object")
Example #7
0
 def testMarcParserLogical(self):
     """Get Marc logical structure."""
     marc_file = file(marc_file_name)
     marc_parser = MarcParser(marc_file, "http://doc.rero.ch")
     logic = marc_parser.get_logical_structure()
     self.assertEqual(logic, None)