Changeset 1728
- Timestamp:
- 09/27/07 15:14:26
- Files:
-
- trunk/cherrypy/_cptools.py (modified) (1 diff)
- trunk/cherrypy/test/test_core.py (modified) (4 diffs)
- trunk/cherrypy/test/test_objectmapping.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cptools.py
r1721 r1728 66 66 67 67 def _merged_args(self, d=None): 68 """Return a dict of configuration entries for this Tool.""" 68 69 if d: 69 70 conf = d.copy() trunk/cherrypy/test/test_core.py
r1717 r1728 163 163 raise cherrypy.InternalRedirect("/") 164 164 165 def choke(self): 166 return 3 / 0 167 choke.exposed = True 168 choke._cp_config = {'hooks.before_error_response': redir_custom} 169 165 170 def relative(self, a, b): 166 171 raise cherrypy.InternalRedirect("cousin?t=6") … … 192 197 def login(self): 193 198 return "Please log in" 194 login._cp_config = {'hooks.before_error_response': redir_custom}195 199 196 200 def custom_err(self): … … 200 204 return "whatever" 201 205 early_ir._cp_config = {'hooks.before_request_body': redir_custom} 206 202 207 203 208 class Image(Test): … … 667 672 668 673 # InternalRedirect on error 669 self.getPage("/internalredirect/ login/illegal/extra/vpath/atoms")674 self.getPage("/internalredirect/choke") 670 675 self.assertStatus(200) 671 676 self.assertBody("Something went horribly wrong.") trunk/cherrypy/test/test_objectmapping.py
r1469 r1728 259 259 self.getPage("/dir1/dir2/5/3/sir") 260 260 self.assertBody("default for dir1, param is:('dir2', '5', '3', 'sir')") 261 262 # test that extra positional args raises 404 263 self.getPage("/dir1/dir2/script_name/extra/stuff") 264 self.assertStatus("404 Not Found") 261 265 262 266 def testExpose(self):

