예제 #1
0
 def test_dao_unitdatestructured_datevalue_subelement(self):
     """
     Test dao tuples
     """
     parsed_ead = TestParsedEad.test_dir
     ead_file_path = TestParsedEad.test_dir + 'metadata/descriptive/EAD-example1.xml'
     pead = ParsedEad(parsed_ead, ead_file_path)
     md_tag = "unitdatestructured"
     res = pead.dao_path_mdval_tuples(md_tag, "ead:datesingle")
     self.assertEqual("22.04.2016", res[0]['mdvalue'])
예제 #2
0
 def test_dao_clevel_attribute_value(self):
     """
     Test dao tuples
     """
     parsed_ead = TestParsedEad.test_dir
     ead_file_path = TestParsedEad.test_dir + 'metadata/descriptive/EAD-example1.xml'
     pead = ParsedEad(parsed_ead, ead_file_path)
     md_tag = "[Cc][0,1][0-9]"
     res = pead.dao_path_mdval_tuples(md_tag, "level", True)
     self.assertEqual("item", res[0]['mdvalue'])
예제 #3
0
 def test_dao_title_tuples(self):
     """
     Test dao tuples
     """
     parsed_ead = TestParsedEad.test_dir
     ead_file_path = TestParsedEad.test_dir + 'metadata/descriptive/EAD-example1.xml'
     pead = ParsedEad(parsed_ead, ead_file_path)
     md_tag = "unittitle"
     res = pead.dao_path_mdval_tuples(md_tag)
     self.assertEqual(
         "metadata/descriptive/representations/rep1/data/Example1.docx",
         res[0]['path'])
     self.assertEqual(
         "metadata/descriptive/representations/rep2/data/Example1.pdf",
         res[1]['path'])
     self.assertEqual("Record - Adams-Ayers", res[0]['mdvalue'])
     self.assertEqual("Record - Adams-Ayers", res[1]['mdvalue'])