Catalogs: Bug fixes allowing the unit tests to pass again.
3 of the tests have been broken since 70dfd6b8d4,
the change to LXML.
This commit is contained in:
@@ -4,7 +4,7 @@ import unittest
|
|||||||
import sgprops
|
import sgprops
|
||||||
import os
|
import os
|
||||||
import catalog
|
import catalog
|
||||||
import xml.etree.cElementTree as ET
|
import lxml.etree as ET
|
||||||
|
|
||||||
catalog.quiet = True
|
catalog.quiet = True
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ class UpdateCatalogTests(unittest.TestCase):
|
|||||||
catalog_node = ET.Element('PropertyList')
|
catalog_node = ET.Element('PropertyList')
|
||||||
catalog_root = ET.ElementTree(catalog_node)
|
catalog_root = ET.ElementTree(catalog_node)
|
||||||
|
|
||||||
pkgNode = catalog.make_aircraft_node('f16', pkg, variants, "http://foo.com/testOutput/")
|
pkgNode = catalog.make_aircraft_node('f16', pkg, variants, "http://foo.com/testOutput/", [])
|
||||||
catalog_node.append(pkgNode)
|
catalog_node.append(pkgNode)
|
||||||
|
|
||||||
# write out so we can parse using sgprops
|
# write out so we can parse using sgprops
|
||||||
@@ -172,7 +172,7 @@ class UpdateCatalogTests(unittest.TestCase):
|
|||||||
catalog_node = ET.Element('PropertyList')
|
catalog_node = ET.Element('PropertyList')
|
||||||
catalog_root = ET.ElementTree(catalog_node)
|
catalog_root = ET.ElementTree(catalog_node)
|
||||||
|
|
||||||
pkgNode = catalog.make_aircraft_node('dc3', pkg, variants, "http://foo.com/testOutput/")
|
pkgNode = catalog.make_aircraft_node('dc3', pkg, variants, "http://foo.com/testOutput/", [])
|
||||||
catalog_node.append(pkgNode)
|
catalog_node.append(pkgNode)
|
||||||
|
|
||||||
if not os.path.isdir("testOutput"):
|
if not os.path.isdir("testOutput"):
|
||||||
@@ -210,7 +210,7 @@ class UpdateCatalogTests(unittest.TestCase):
|
|||||||
catalog_node = ET.Element('PropertyList')
|
catalog_node = ET.Element('PropertyList')
|
||||||
catalog_root = ET.ElementTree(catalog_node)
|
catalog_root = ET.ElementTree(catalog_node)
|
||||||
|
|
||||||
pkgNode = catalog.make_aircraft_node('c150', pkg, variants, "http://foo.com/testOutput/")
|
pkgNode = catalog.make_aircraft_node('c150', pkg, variants, "http://foo.com/testOutput/", [])
|
||||||
catalog_node.append(pkgNode)
|
catalog_node.append(pkgNode)
|
||||||
|
|
||||||
if not os.path.isdir("testOutput2"):
|
if not os.path.isdir("testOutput2"):
|
||||||
|
|||||||
Reference in New Issue
Block a user