def test_find_upper_neighbor_method_parent(self): original_xpath = "/ead/archdesc/dsc/c03/did" parent_xpath = "/ead/archdesc/dsc/c03" processed_xpath = euf.retrieve_upper_c0x_neighbor_xpath(self.lxml_upper_neighbor, original_xpath) self.assertEqual(processed_xpath, parent_xpath)
def test_find_upper_neighbor_method_parent(self): original_xpath = "/ead/archdesc/dsc/c03/did" parent_xpath = "/ead/archdesc/dsc/c03" processed_xpath = euf.retrieve_upper_c0x_neighbor_xpath( self.lxml_upper_neighbor, original_xpath) self.assertEqual(processed_xpath, parent_xpath)
def test_find_upper_neighbor_method_sibling(self): original_xpath = "/ead/archdesc/dsc/c03/c04[3]/did/container" sib_xpath = "/ead/archdesc/dsc/c03/c04[2]" processed_xpath = euf.retrieve_upper_c0x_neighbor_xpath(self.lxml_upper_neighbor, original_xpath) self.assertEqual(processed_xpath, sib_xpath)
def test_find_upper_neighbor_method_sibling(self): original_xpath = "/ead/archdesc/dsc/c03/c04[3]/did/container" sib_xpath = "/ead/archdesc/dsc/c03/c04[2]" processed_xpath = euf.retrieve_upper_c0x_neighbor_xpath( self.lxml_upper_neighbor, original_xpath) self.assertEqual(processed_xpath, sib_xpath)