Changeset 1894
- Timestamp:
- 02/18/08 13:18:55
- Files:
-
- branches/cherrypy-3.0.x/cherrypy/_cpdispatch.py (modified) (1 diff)
- branches/cherrypy-3.0.x/cherrypy/test/test_routes.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/cherrypy-3.0.x/cherrypy/_cpdispatch.py
r1625 r1894 321 321 action = result.get('action', None) 322 322 if action is not None: 323 handler = getattr(controller, action )323 handler = getattr(controller, action, None) 324 324 # Get config from the handler 325 325 if hasattr(handler, "_cp_config"): branches/cherrypy-3.0.x/cherrypy/test/test_routes.py
r1597 r1894 9 9 10 10 def setup_server(): 11 12 class Dummy: 13 def index(self): 14 return "I said good day!" 11 15 12 16 class City: … … 31 35 d.mapper.connect('surbiton', controller='surbiton', 32 36 action='update', conditions=dict(method=['POST'])) 37 d.connect('main', ':action', controller=Dummy()) 33 38 34 39 conf = {'/': {'request.dispatch': d}} … … 45 50 self.assertStatus("200 OK") 46 51 self.assertBody("Welcome to Hounslow, pop. 10000") 52 53 self.getPage("/foo") 54 self.assertStatus("404 Not Found") 47 55 48 56 self.getPage("/surbiton")

