[Zope3-checkins] CVS: Zope3/src/zope/fssync/tests - test_network.py:1.3
Guido van Rossum
guido@python.org
Thu, 15 May 2003 16:03:05 -0400
Update of /cvs-repository/Zope3/src/zope/fssync/tests
In directory cvs.zope.org:/tmp/cvs-serv26849
Modified Files:
test_network.py
Log Message:
Add a test for a URL without trailing slash; this should set rootpath
to "/".
=== Zope3/src/zope/fssync/tests/test_network.py 1.2 => 1.3 ===
--- Zope3/src/zope/fssync/tests/test_network.py:1.2 Tue May 13 13:39:12 2003
+++ Zope3/src/zope/fssync/tests/test_network.py Thu May 15 16:03:05 2003
@@ -82,6 +82,15 @@
self.assertEqual(self.network.user_passwd, "user:passwd")
self.assertEqual(self.network.host_port, "host:8080")
+ def test_setrooturl_nopath(self):
+ rooturl = "http://user:passwd@host:8080"
+ self.network.setrooturl(rooturl)
+ self.assertEqual(self.network.rooturl, rooturl)
+ self.assertEqual(self.network.roottype, "http")
+ self.assertEqual(self.network.rootpath, "/")
+ self.assertEqual(self.network.user_passwd, "user:passwd")
+ self.assertEqual(self.network.host_port, "host:8080")
+
def test_findrooturl_notfound(self):
# XXX This test will fail if a file /tmp/@@Zope/Root exists :-(
target = self.adddir()