def testModsParserPhysical(self):
     """Get Mods physical structure."""
     mods_file = file(mods_file_name)
     mods_parser = ModsParser(mods_file, 'http://doc.rero.ch')
     phys = mods_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))
Beispiel #2
0
 def testModsParserPhysical(self):
     """Get Mods physical structure."""
     mods_file = file(mods_file_name)
     mods_parser = ModsParser(mods_file, "http://doc.rero.ch")
     phys = mods_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 testModsParserMeta(self):
     """Get Mods Metadata."""
     mods_file = file(mods_file_name)
     mods_parser = ModsParser(mods_file, 'http://doc.rero.ch')
     meta = mods_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))
Beispiel #4
0
 def testModsParserMeta(self):
     """Get Mods Metadata."""
     mods_file = file(mods_file_name)
     mods_parser = ModsParser(mods_file, "http://doc.rero.ch")
     meta = mods_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 testModsParserLogical(self):
     """Get Mods logical structure."""
     mods_file = file(mods_file_name)
     mods_parser = ModsParser(mods_file, 'http://doc.rero.ch')
     logic = mods_parser.get_logical_structure()
     self.assertEqual(logic, None)
 def testModsParser(self):
     """Check ModsParser instance."""
     mods_file = file(mods_file_name)
     mods_parser = ModsParser(mods_file, 'http://doc.rero.ch')
     self.assert_(mods_parser, "Can not create simple ModsParser Object")
Beispiel #7
0
 def testModsParserLogical(self):
     """Get Mods logical structure."""
     mods_file = file(mods_file_name)
     mods_parser = ModsParser(mods_file, "http://doc.rero.ch")
     logic = mods_parser.get_logical_structure()
     self.assertEqual(logic, None)