From: <sa...@us...> - 2006-12-05 06:43:29
|
Revision: 1303 http://svn.sourceforge.net/pywebsvcs/?rev=1303&view=rev Author: sanxiyn Date: 2006-12-04 22:43:29 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Fix #1455495 with a test Modified Paths: -------------- trunk/SOAPpy/SOAPpy/Parser.py trunk/SOAPpy/tests/SOAPtest.py Modified: trunk/SOAPpy/SOAPpy/Parser.py =================================================================== --- trunk/SOAPpy/SOAPpy/Parser.py 2006-12-05 05:47:38 UTC (rev 1302) +++ trunk/SOAPpy/SOAPpy/Parser.py 2006-12-05 06:43:29 UTC (rev 1303) @@ -869,9 +869,9 @@ if t[1] == "boolean": d = d.strip().lower() if d in ('0', 'false'): - return 0 + return False if d in ('1', 'true'): - return 1 + return True raise AttributeError, "invalid boolean value" if t[1] in ('double','float'): l = self.floatlimits[t[1]] Modified: trunk/SOAPpy/tests/SOAPtest.py =================================================================== --- trunk/SOAPpy/tests/SOAPtest.py 2006-12-05 05:47:38 UTC (rev 1302) +++ trunk/SOAPpy/tests/SOAPtest.py 2006-12-05 06:43:29 UTC (rev 1303) @@ -706,6 +706,13 @@ self.assertEquals(s.param2, None) self.assertEquals(s.param3, 7) + def testBoolean2(self): + x = True + y = buildSOAP(x) + z = parseSOAPRPC(y) + self.assertEquals(x, z) + self.assertEquals(type(z), bool) + def testFault(self): my_xml5 = ''' <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |