1.1 --- a/tests/macrotest.py Mon Jan 24 10:36:41 2005 +0000
1.2 +++ b/tests/macrotest.py Mon Jan 24 10:37:17 2005 +0000
1.3 @@ -2,8 +2,7 @@
1.4
1.5 "A test of macros."
1.6
1.7 -from libxml2dom.macrolib import *
1.8 -import libxml2
1.9 +import libxml2macro as x2_
1.10 import xml.dom
1.11
1.12 class Container:
1.13 @@ -82,18 +81,23 @@
1.14
1.15 def test_import(x2_d):
1.16
1.17 - x2_root = find_root(x2_d)
1.18 + # Change the prefix.
1.19 +
1.20 + import libxml2macro as node_
1.21 + node_d = x2_d
1.22 +
1.23 + node_root = find_root(node_d)
1.24
1.25 # Create a new document.
1.26
1.27 - x2_d2 = createDocument("nsD", "newdoc", None)
1.28 - x2_root2 = find_root(x2_d2)
1.29 + node_d2 = createDocument("nsD", "newdoc", None)
1.30 + node_root2 = find_root(node_d2)
1.31
1.32 # Attempt to import nodes from the original document.
1.33
1.34 - x2_imported = x2_d2.importNode(x2_root, 1)
1.35 - x2_d2.replaceChild(x2_imported, x2_root2)
1.36 + node_imported = node_d2.importNode(node_root, 1)
1.37 + node_d2.replaceChild(node_imported, node_root2)
1.38
1.39 - return x2_d, x2_d2
1.40 + return node_d, node_d2
1.41
1.42 # vim: tabstop=4 expandtab shiftwidth=4