Exemple #1
0
 def test_load_xml_resource(self):
     self.assertTrue(is_etree_element(load_xml_resource(self.vh_xml_file, element_only=True)))
     root, text, url = load_xml_resource(self.vh_xml_file, element_only=False)
     self.assertTrue(is_etree_element(root))
     self.assertEqual(root.tag, '{http://example.com/vehicles}vehicles')
     self.assertTrue(text.startswith('<?xml version'))
     self.check_url(url, self.vh_xml_file)
Exemple #2
0
 def test_load_xml_resource(self):
     self.assertTrue(
         is_etree_element(
             load_xml_resource(self.vh_xml_file, element_only=True)))
     root, text, url = load_xml_resource(self.vh_xml_file,
                                         element_only=False)
     self.assertTrue(is_etree_element(root))
     self.assertEqual(root.tag, '{http://example.com/vehicles}vehicles')
     self.assertTrue(text.startswith('<?xml version'))
     self.check_url(url, self.vh_xml_file)