Changeset 2049
- Timestamp:
- 10/15/08 12:15:15
- Files:
-
- trunk/cherrypy/_cptree.py (modified) (1 diff)
- trunk/cherrypy/test/test_objectmapping.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cptree.py
r2039 r2049 171 171 if isinstance(root, Application): 172 172 app = root 173 if script_name != "": 174 raise ValueError, "Cannot specify a script name and pass an Application instance to cherrypy.mount" 175 script_name = app.script_name 173 176 else: 174 177 app = Application(root, script_name) trunk/cherrypy/test/test_objectmapping.py
r2030 r2049 1 1 from cherrypy.test import test 2 from cherrypy._cptree import Application 2 3 test.prefer_parent_path() 3 4 … … 324 325 self.assertBody("milk") 325 326 327 def testTreeMounting(self): 328 329 # When mounting an application instance, 330 # we can't specify a script name in the call to mount. 331 a = Application(object(), '/somewhere') 332 self.assertRaises(ValueError, cherrypy.tree.mount, a, '/somewhereelse') 333 334 try: 335 cherrypy.tree.mount(a) 336 except ValueError: 337 self.fail("cherrypy.tree.mount incorrectly raised a ValueError") 338 339 340 341 326 342 327 343 if __name__ == "__main__":

