from Ft.Lib import cDomlettec
from xml.dom import ext


def Test(tester):


    tester.startGroup("cDomlette Methods")
    tester.startTest("cDomlette Methods")
    tester.warning("Does not properly use test suite")
    tester.warning("Is not tested")
    tester.testDone()
    tester.groupDone()
    return

    doc =  cDomlettec.test()


    #Test document methods
    print doc.normalize()
    print doc.hasChildNodes()

    print doc.documentElement.childNodes[1].childNodes[0].normalize()
    print doc.documentElement.childNodes[1].childNodes[0].hasChildNodes()

    for namespaceUri,localName in doc.documentElement.attributes.keys():
        attr = doc.documentElement.getAttributeNodeNS(namespaceUri,localName)
        print attr
    attr = doc.documentElement.getAttributeNodeNS("foo","Foo")
    print attr
    attr = doc.documentElement.childNodes[2].getAttributeNodeNS("foo","Foo")
    print attr

    #Remove a child
    ext.PrettyPrint(doc)
    doc.documentElement.removeChild(doc.documentElement.childNodes[0])
    ext.PrettyPrint(doc)


if __name__ == '__main__':
    from Ft.Lib import TestSuite
    tester = TestSuite.TestSuite(1,1)
    Test(tester)
