def test_no_annotation_no_change(self):
        not_annotated_etree = self.annotation_data_handler.get_xsd("not_annot")

        not_annotated_element = not_annotated_etree.xpath(self.xsd_xpath, namespaces=self.namespaces)[0]

        remove_annotations(not_annotated_element)

        self.assertTrue(are_equals(not_annotated_element, self.expected_xsd))
Example #2
0
    def test_no_annotation_no_change(self):
        not_annotated_etree = self.annotation_data_handler.get_xsd('not_annot')

        not_annotated_element = not_annotated_etree.xpath(
            self.xsd_xpath, namespaces=self.namespaces)[0]

        remove_annotations(not_annotated_element)

        self.assertTrue(are_equals(not_annotated_element, self.expected_xsd))
    def test_annotation_is_removed(self):
        annotated_etree = self.annotation_data_handler.get_xsd("annot")
        # annotated_etree = etree.ElementTree(annotated_schema)

        annotated_element = annotated_etree.xpath(self.xsd_xpath, namespaces=self.namespaces)[0]

        remove_annotations(annotated_element)

        self.assertTrue(are_equals(annotated_element, self.expected_xsd))
Example #4
0
    def test_annotation_is_removed(self):
        annotated_etree = self.annotation_data_handler.get_xsd('annot')
        # annotated_etree = etree.ElementTree(annotated_schema)

        annotated_element = annotated_etree.xpath(
            self.xsd_xpath, namespaces=self.namespaces)[0]

        remove_annotations(annotated_element)

        self.assertTrue(are_equals(annotated_element, self.expected_xsd))