Commits

jaraco  committed 9efa191

Adding failing test case for #1061

  • Participants
  • Parent commits a35fedc

Comments (0)

Files changed (1)

File py2/cherrypy/test/test_request_obj.py

                 setattr(root, name.lower(), cls())
         class Test(object):
             __metaclass__ = TestType
-        
-        
+
+
+        class PathInfo(Test):
+
+            def default(self, *args):
+                return cherrypy.request.path_info
+
         class Params(Test):
             
             def index(self, thing):
     def test_scheme(self):
         self.getPage("/scheme")
         self.assertBody(self.scheme)
-    
+
+    def testRelativeURIPathInfo(self):
+        self.getPage("/pathinfo/foo/bar")
+        self.assertBody("/pathinfo/foo/bar")
+
+    def testAbsoluteURIPathInfo(self):
+        # http://cherrypy.org/ticket/1061
+        self.getPage("http://localhost/pathinfo/foo/bar")
+        self.assertBody("/pathinfo/foo/bar")
+
     def testParams(self):
         self.getPage("/params/?thing=a")
         self.assertBody("u'a'")