|
From: <wa...@us...> - 2008-05-15 22:18:05
|
Revision: 1459
http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1459&view=rev
Author: warnes
Date: 2008-05-15 15:18:12 -0700 (Thu, 15 May 2008)
Log Message:
-----------
Add test case for Bug #193688. SOAPpy is losing attributes on basic types
Added Paths:
-----------
trunk/SOAPpy/tests/Bug1936883.py
Added: trunk/SOAPpy/tests/Bug1936883.py
===================================================================
--- trunk/SOAPpy/tests/Bug1936883.py (rev 0)
+++ trunk/SOAPpy/tests/Bug1936883.py 2008-05-15 22:18:12 UTC (rev 1459)
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+
+ident = '$Id: speedTest.py 243 2003-05-21 14:52:37Z warnes $'
+
+import time
+import sys
+sys.path.insert(1, "..")
+
+from SOAPpy import parseSOAP, parseSOAPRPC
+
+env = '''<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsd2="http://www.w3.org/2000/10/XMLSchema" xmlns:xsd3="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
+%s
+</SOAP-ENV:Envelope>'''
+
+xml = env % '''<SOAP-ENV:Body>
+<_1 SOAP-ENC:arrayType="xsd:int[4]" SOAP-ENC:offset="[2]" xsi:type="SOAP-ENC:Array">
+ <_2 SOAP-ENC:arrayType="xsd:int[2]" xsi:type="SOAP-ENC:Array">
+ <item>1</item>
+ <item>2</item>
+ </_2>
+ <_3 SOAP-ENC:arrayType="xsd:double[2]" xsi:type="SOAP-ENC:Array">
+ <item>3.3</item>
+ <item>4.4</item>
+ </_3>
+ <_4 SOAP-ENC:arrayType="xsd:bool[2]" xsi:type="SOAP-ENC:Array">
+ <item>0</item>
+ <item>1</item>
+ </_4>
+ <_5 SOAP-ENC:arrayType="xsd:bool[2]" xsi:type="SOAP-ENC:Array">
+ <item>False</item>
+ <item>True</item>
+ </_5>
+</_1>
+</SOAP-ENV:Body>'''
+
+
+x = parseSOAPRPC(xml)
+
+
+assert( x[2] == [ 1, 2 ] )
+assert( x[3] == [ 3.3, 4.4 ] )
+
+# These previously failed, instead having strings
+assert( x[4] == [ False, True ] )
+assert( x[5] == [ False, True ] )
+
+print "Success"
+
Property changes on: trunk/SOAPpy/tests/Bug1936883.py
___________________________________________________________________
Name: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|