Issue #968 new

cherrypy.test.helper recognizes requests server does not

guest
created an issue

I've attached two files. One is a simple xmlrpc server in CherryPy that returns ["Hello", "World"]. The other uses cherrypy.test.helper to test the server. Although all tests pass, if you actually start the server and use xmlrpclib to recreate the test, it does not work:

{{{ In [7]: sp = xmlrpclib.ServerProxy('http://localhost:8080')

In [8]: sp.hello()

ProtocolError Traceback (most recent call last)

/home/kkinder/Desktop/<ipython console> in <module>()

/usr/lib/python2.6/xmlrpclib.pyc in call(self, args) 1197 return _Method(self.send, "%s.%s" % (self.name, name)) 1198 def call(self, args): -> 1199 return self.send(self.name, args) 1200 1201 ##

/usr/lib/python2.6/xmlrpclib.pyc in request(self, methodname, params) 1487 self.handler, 1488 request, -> 1489 verbose=self.__verbose 1490 ) 1491

/usr/lib/python2.6/xmlrpclib.pyc in request(self, host, handler, request_body, verbose) 1241 host + handler, 1242 errcode, errmsg, -> 1243 headers 1244 ) 1245

ProtocolError: <ProtocolError for localhost:8080/RPC2: 302 Found> }}}

It's possible that I'm incorrectly using the xmlrpc controller, but if that's the case, the unittests should also fail. Does this make sense?

Comments (0)

  1. Log in to comment