def check_element_in_default_ns(self): msg = """ <test xsi:type="myInt" xmlns="urn:vim25" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 100 </test>""" ps = ParsedSoap(msg, envelope=False) pyobj = ps.Parse(TC.AnyType(pname=("urn:vim25","test"))) self.failUnless(pyobj == 100, 'failed to parse element in default ns')
def check_type_attribute_qname_in_default_ns(self): msg = """ <ns1:test xsi:type="ns1:myInt" xmlns:ns1="urn:vim25" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema"> 100 </ns1:test>""" ps = ParsedSoap(msg, envelope=False) pyobj = ps.Parse(TC.AnyType(pname=("urn:vim25","test"))) self.failUnless(pyobj == 100, 'failed to parse type in default ns')