From: <wa...@us...> - 2008-05-15 22:17:05
|
Revision: 1458 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1458&view=rev Author: warnes Date: 2008-05-15 15:17: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/Bug1356261.py Added: trunk/SOAPpy/tests/Bug1356261.py =================================================================== --- trunk/SOAPpy/tests/Bug1356261.py (rev 0) +++ trunk/SOAPpy/tests/Bug1356261.py 2008-05-15 22:17:12 UTC (rev 1458) @@ -0,0 +1,41 @@ +#!/usr/bin/env python + +ident = '$Id: SOAPtest.py,v 1.19 2004/04/01 13:25:46 warnes Exp $' + +import urllib +import sys +import unittest +import re + +sys.path.insert(1, "..") +from SOAPpy import * +config=Config +config.strict_range=1 + + +class SOAPTestCase(unittest.TestCase): + def testAttributes(self): + x = '''<?xml version="1.0" encoding="utf-8"?> +<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> +<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> +<SomeMethod> +<Result> +<Book> + <title some_attr='some_value'>My Life and Work</title> +</Book> +<Person> + <name>Henry Ford</name> + <age> 49 </age> + <height> 5.5 </height> +</Person> +</Result> +</SomeMethod> +</soap:Body> +</soap:Envelope> +''' + # parse rules + y = parseSOAPRPC(x) + self.assertEquals(y.Result.Book.title._attrs[(None, 'some_attr')], 'some_value'); + +if __name__ == '__main__': + unittest.main() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |