Commits

Robert Brewer committed bae507d

New test showing that cherrypy.url fails with relative path when using virtual host.

  • Participants
  • Parent commits 10ed572

Comments (0)

Files changed (1)

cherrypy/test/test_virtualhost.py

         def vmethod(self, value):
             return "You sent %s" % repr(value)
         vmethod.exposed = True
+        
+        def url(self):
+            return cherrypy.url("nextpage")
+        url.exposed = True
     
     
     root = Root()
         self.assertBody("You sent 'dom3 POST'")
         self.getPage("/vmethod/pos", [('Host', 'www.mydom3.com')])
         self.assertBody("You sent 'pos'")
+        
+        self.getPage("/url", [('Host', 'www.mydom2.com')])
+        self.assertBody("http://www.mydom2.com/nextpage")
 
 
 if __name__ == "__main__":