Changeset 1737
- Timestamp:
- 10/04/07 10:47:30
- Files:
-
- trunk/cherrypy/_cprequest.py (modified) (1 diff)
- trunk/cherrypy/test/test_objectmapping.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cprequest.py
r1723 r1737 627 627 # dispatchers can only be specified in app.config, not in _cp_config 628 628 # (since custom dispatchers may not even have an app.root). 629 trail = path 629 trail = path or "/" 630 630 while trail: 631 631 nodeconf = self.app.config.get(trail, {}) trunk/cherrypy/test/test_objectmapping.py
r1728 r1737 133 133 Root.collection = Collection() 134 134 135 d = cherrypy.dispatch.MethodDispatcher() 135 136 for url in script_names: 136 d = cherrypy.dispatch.MethodDispatcher()137 137 conf = {'/': {'user': (url or "/").split("/")[-2]}, 138 138 '/bymethod': {'request.dispatch': d}, … … 150 150 151 151 cherrypy.tree.mount(Isolated(), "/isolated") 152 153 class AnotherApp: 154 155 exposed = True 156 157 def GET(self): 158 return "milk" 159 160 cherrypy.tree.mount(AnotherApp(), "/app", {'/': {'request.dispatch': d}}) 152 161 153 162 … … 309 318 self.getPage("/collection", method="GET") 310 319 self.assertBody("['a', 'bit', 'silly']") 320 321 # Test custom dispatcher set on app root (see #737). 322 self.getPage("/app") 323 self.assertBody("milk") 311 324 312 325

