19 |
# MA 02111-1307 USA |
# MA 02111-1307 USA |
20 |
# |
# |
21 |
|
|
22 |
import gzz, java |
import org.fenfire, java |
23 |
|
|
24 |
def testSimple(): |
def testSimple(): |
25 |
map = gzz.loom.NamespaceMap() |
map = org.fenfire.loom.NamespaceMap() |
26 |
|
|
27 |
assert map.getAbbrev("http://example.com/foo") == \ |
assert map.getAbbrev("http://example.com/foo") == \ |
28 |
"http://example.com/foo" |
"http://example.com/foo" |
45 |
|
|
46 |
|
|
47 |
def testFromXML(): |
def testFromXML(): |
48 |
map = gzz.loom.NamespaceMap() |
map = org.fenfire.loom.NamespaceMap() |
49 |
xml = """ |
xml = """ |
50 |
<one:xml xmlns:one="http://example.com/" |
<one:xml xmlns:one="http://example.com/" |
51 |
xmlns="http://example.net/FOO"> |
xmlns="http://example.net/FOO"> |
71 |
|
|
72 |
|
|
73 |
def testCompareByAbbrev(): |
def testCompareByAbbrev(): |
74 |
map = gzz.loom.NamespaceMap() |
map = org.fenfire.loom.NamespaceMap() |
75 |
map.put("one", "http://example.com/") |
map.put("one", "http://example.com/") |
76 |
map.put("two", "mailto:foo@") |
map.put("two", "mailto:foo@") |
77 |
|
|