def test_large_integer(self): i = 128375873458473 integer = Integer() element = etree.Element('test') Integer.to_xml(i, ns_test, element) element = element[0] self.assertEquals(element.text, '128375873458473') self.assertEquals('xs:integer', element.get('{%s}type' % soaplib.ns_xsi)) value = integer.from_xml(element) self.assertEquals(value, i)
def test_integer(self): i = 12 integer = Integer() element = Integer.to_xml(i) self.assertEquals(element.text, '12') self.assertEquals('xs:int', element.get(ns.get('xsi') + 'type')) value = integer.from_xml(element) self.assertEquals(value, i)
def test_large_integer(self): i = 128375873458473 integer = Integer() element = Integer.to_xml(i) self.assertEquals(element.text, '128375873458473') self.assertEquals('xs:integer', element.get(ns.get('xsi') + 'type')) value = integer.from_xml(element) self.assertEquals(value, i)
def test_integer(self): i = 12 integer = Integer() element = Integer.to_xml(i, ns_test) self.assertEquals(element.text, '12') self.assertEquals('xs:integer', element.get('{%s}type' % soaplib.ns_xsi)) value = integer.from_xml(element) self.assertEquals(value, i)