Issue #377 resolved

test_xmlrpc_filter FAILED when running test.py --serverless

Robert Brewer
created an issue

{{{ C:\Python23\Lib\site-packages>python cherrypy\test\test.py --serverless --test_xmlrpc_filter Python version used to run this test script: 2.3.2 CherryPy version 2.1.0

Running tests: Serverless test_0_NormalStateFlow (test_states.ServerStateTests) ... ok test_1_Restart (test_states.ServerStateTests) ... ok test_2_KeyboardInterrupt (test_states.ServerStateTests) ... ok testXmlRpcFilter (test_xmlrpc_filter.XmlRpcFilterTest) ... ERROR

====================================================================== ERROR: testXmlRpcFilter (test_xmlrpc_filter.XmlRpcFilterTest)


Traceback (most recent call last): File "C:\Python23\Lib\site-packages\cherrypy\test\test_xmlrpc_filter.py", line 103, in testXmlRpcFilter self.assertEqual(proxy.return_single_item_list(), File "C:\Python23\lib\xmlrpclib.py", line 1029, in call return self.send(self.name, args) File "C:\Python23\lib\xmlrpclib.py", line 1316, in request verbose=self.verbose File "C:\Python23\lib\xmlrpclib.py", line 1062, in request self.send_content(h, request_body) File "C:\Python23\lib\xmlrpclib.py", line 1176, in send_content connection.endheaders() File "C:\Python23\lib\httplib.py", line 712, in endheaders self._send_output() File "C:\Python23\lib\httplib.py", line 597, in _send_output self.send(msg) File "C:\Python23\lib\httplib.py", line 564, in send self.connect() File "C:\Python23\lib\httplib.py", line 548, in connect raise socket.error, msg error: (10061, 'Connection refused')

FAILED (errors=1)

hit enter }}}

Comments (5)

  1. Christian Wyglendowski

    That's because it is using xmlrpclib.!ServerProxy to call the methods in the test. It uses a '''real''' host:port connection to the server in order to issue the xmlrpc requests.

    It looks like xmlrpc request bodies can be built easy enough with xmlrpclib.dumps() and then posted to CP using the test framework. If it is done that way it should work serverless.

  2. Log in to comment