[Zope3-checkins] CVS: Zope3/src/zope/app/traversing/ftests - test_vhosting.py:1.7

Jim Fulton jim at zope.com
Fri Aug 8 15:07:45 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/traversing/ftests
In directory cvs.zope.org:/tmp/cvs-serv5525/src/zope/app/traversing/ftests

Modified Files:
	test_vhosting.py 
Log Message:
Changed the virtual host handler to require a closing ++ path
element.


=== Zope3/src/zope/app/traversing/ftests/test_vhosting.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/traversing/ftests/test_vhosting.py:1.6	Tue May 27 10:18:27 2003
+++ Zope3/src/zope/app/traversing/ftests/test_vhosting.py	Fri Aug  8 14:07:40 2003
@@ -42,18 +42,18 @@
     def test_request_url(self):
         self.addPage('/pt', u'<span tal:replace="request/URL"/>')
         self.verify('/pt', 'http://localhost/pt/index.html\n')
-        self.verify('/++vh++/pt',
+        self.verify('/++vh++/++/pt',
                     'http://localhost/pt/index.html\n')
-        self.verify('/++vh++https:otherhost:443/pt',
+        self.verify('/++vh++https:otherhost:443/++/pt',
                     'https://otherhost/pt/index.html\n')
         self.verify('/++vh++https:otherhost:443/fake/folders/++/pt',
                     'https://otherhost/fake/folders/pt/index.html\n')
 
         self.addPage('/foo/bar/pt', u'<span tal:replace="request/URL"/>')
         self.verify('/foo/bar/pt', 'http://localhost/foo/bar/pt/index.html\n')
-        self.verify('/foo/bar/++vh++/pt',
+        self.verify('/foo/bar/++vh++/++/pt',
                     'http://localhost/pt/index.html\n')
-        self.verify('/foo/bar/++vh++https:otherhost:443/pt',
+        self.verify('/foo/bar/++vh++https:otherhost:443/++/pt',
                     'https://otherhost/pt/index.html\n')
         self.verify('/foo/++vh++https:otherhost:443/fake/folders/++/bar/pt',
                     'https://otherhost/fake/folders/bar/pt/index.html\n')
@@ -63,10 +63,10 @@
         self.verify('/pt',
                     '<head>\n<base href="http://localhost/pt/index.html" />\n'
                     '</head>\n')
-        self.verify('/++vh++/pt',
+        self.verify('/++vh++/++/pt',
                     '<head>\n<base href="http://localhost/pt/index.html" />\n'
                     '</head>\n')
-        self.verify('/++vh++https:otherhost:443/pt',
+        self.verify('/++vh++https:otherhost:443/++/pt',
                     '<head>\n'
                     '<base href="https://otherhost/pt/index.html" />'
                     '\n</head>\n')
@@ -80,10 +80,10 @@
                     '<head>\n<base '
                     'href="http://localhost/foo/bar/pt/index.html" />\n'
                     '</head>\n')
-        self.verify('/foo/bar/++vh++/pt',
+        self.verify('/foo/bar/++vh++/++/pt',
                     '<head>\n<base href="http://localhost/pt/index.html" />\n'
                     '</head>\n')
-        self.verify('/foo/bar/++vh++https:otherhost:443/pt',
+        self.verify('/foo/bar/++vh++https:otherhost:443/++/pt',
                     '<head>\n'
                     '<base href="https://otherhost/pt/index.html" />'
                     '\n</head>\n')
@@ -95,7 +95,7 @@
     def test_request_redirect(self):
         self.addPage('/foo/index.html', u'Spam')
         self.verifyRedirect('/foo', 'http://localhost/foo/index.html')
-        self.verifyRedirect('/++vh++https:otherhost:443/foo',
+        self.verifyRedirect('/++vh++https:otherhost:443/++/foo',
                             'https://otherhost/foo/index.html')
         self.verifyRedirect('/foo/++vh++https:otherhost:443/bar/++',
                             'https://otherhost/bar/index.html')
@@ -103,9 +103,9 @@
     def test_absolute_url(self):
         self.addPage('/pt', u'<span tal:replace="template/@@absolute_url"/>')
         self.verify('/pt', 'http://localhost/pt\n')
-        self.verify('/++vh++/pt',
+        self.verify('/++vh++/++/pt',
                     'http://localhost/pt\n')
-        self.verify('/++vh++https:otherhost:443/pt',
+        self.verify('/++vh++https:otherhost:443/++/pt',
                     'https://otherhost/pt\n')
         self.verify('/++vh++https:otherhost:443/fake/folders/++/pt',
                     'https://otherhost/fake/folders/pt\n')
@@ -113,9 +113,9 @@
         self.addPage('/foo/bar/pt',
                      u'<span tal:replace="template/@@absolute_url"/>')
         self.verify('/foo/bar/pt', 'http://localhost/foo/bar/pt\n')
-        self.verify('/foo/bar/++vh++/pt',
+        self.verify('/foo/bar/++vh++/++/pt',
                     'http://localhost/pt\n')
-        self.verify('/foo/bar/++vh++https:otherhost:443/pt',
+        self.verify('/foo/bar/++vh++https:otherhost:443/++/pt',
                     'https://otherhost/pt\n')
         self.verify('/foo/++vh++https:otherhost:443/fake/folders/++/bar/pt',
                     'https://otherhost/fake/folders/bar/pt\n')
@@ -125,7 +125,7 @@
         self.addPage('/foo/bar/pt',
                      u'<span tal:replace="container/obj/pt/@@absolute_url"/>')
         self.verify('/foo/bar/pt', 'http://localhost/foo/bar/pt\n')
-        self.verify('/foo/++vh++https:otherhost:443/bar/pt',
+        self.verify('/foo/++vh++https:otherhost:443/++/bar/pt',
                     'https://otherhost/bar/pt\n')
 
     def test_resources(self):




More information about the Zope3-Checkins mailing list