[Zope3-dev] Functional testing of XML-RPC views

Christian Theune ct at gocept.com
Tue Sep 19 04:14:34 EDT 2006


Hi,

I just wanted to functionally test an XML-RPC view and saw that
currently those requests are hand crafted using http().

Wolfgang and I came up with a special transport for
xmlrpclib.ServerProxy as a wrapper to http() so you can use


  >>> from zope.app.testing.xmlrpc import ServerProxy
  >>> proxy = ServerProxy("http://mgr:mgrpw@localhost/")
  >>> proxy.xy

to do functional testing of XML-RPC views in Zope 3 now.

I changed the publisher xmlrpc tests to use this utility now. This has
two meanings

1) Those tests now both test the XML-RPC testing utility and the publisher
2) Those tests now have a bit different semantics: Instead of comparing
exact request strings for the XML-RPC message the tests now test whether
the xmlrpclib is able to talk to the view.

I'd like some feedback on this change before checking this in to the trunk.

Christian

-- 
gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20060919/ceaed1d2/signature.bin


More information about the Zope3-dev mailing list