#968: cherrypy.test.helper recognizes requests server does not
---------------------------+----------------------------------------------- -
Reporter: guest | Owner: fumanchu
Type: defect | Status: new
Priority: normal | Milestone:
Component: CherryPy code | Keywords:
---------------------------+----------------------------------------------- -
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?
--
Ticket URL: <http://cherrypy.org/ticket/968>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework