Changeset 1663
- Timestamp:
- 06/14/07 13:34:20
- Files:
-
- trunk/cherrypy/_cptools.py (modified) (2 diffs)
- trunk/cherrypy/test/test_xmlrpc.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cptools.py
r1662 r1663 278 278 _cp_config = {'tools.xmlrpc.on': True} 279 279 280 def __call__(self, *vpath, **params):280 def default(self, *vpath, **params): 281 281 rpcparams, rpcmethod = _xmlrpc.process_body() 282 282 … … 300 300 conf.get('allow_none', 0)) 301 301 return cherrypy.response.body 302 __call__.exposed = True 303 304 index = __call__ 302 default.exposed = True 305 303 306 304 trunk/cherrypy/test/test_xmlrpc.py
r1540 r1663 16 16 17 17 class XmlRpc(_cptools.XMLRPCController): 18 19 def foo(self): 20 return "Hello world!" 21 foo.exposed = True 18 22 19 23 def return_single_item_list(self): … … 94 98 95 99 # load the appropriate xmlrpc proxy 96 if getattr(self.harness, "scheme", "http") == "https": 100 scheme = "http" 101 try: 102 scheme = self.harness.scheme 103 except AttributeError: 104 pass 105 106 if scheme == "https": 97 107 url = 'https://%s:%s/xmlrpc/' % (self.HOST, self.PORT) 98 108 proxy = xmlrpclib.ServerProxy(url, transport=HTTPSTransport()) … … 102 112 103 113 # begin the tests ... 114 self.getPage("/xmlrpc/foo") 115 self.assertBody("Hello world!") 116 104 117 self.assertEqual(proxy.return_single_item_list(), [42]) 105 118 self.assertNotEqual(proxy.return_single_item_list(), 'one bazillion')

