Exemple #1
0
    def test_to_xml(self):
        source_node = etree.XML(self.xml_file)

        vectors = Vectors.parse(LXMLDocumentBuilder, source_node)
        xml_node = Vectors.build(LXMLDocumentBuilder, vectors)
        self.assertIsNotNone(xml_node)
        vectors = Vectors.parse(LXMLDocumentBuilder, xml_node)
        self.assertEqual(len(vectors), 3)
        vector = vectors[0]
        self.assert_vector(vector)
Exemple #2
0
 def test_from_xml(self):
     node = etree.XML(self.xml_file)
     vectors = Vectors.parse(LXMLDocumentBuilder, node)
     self.assertEqual(len(vectors), 3)
     vector = vectors[0]
     self.assert_vector(vector)