[Zodb-checkins] CVS: Packages/ZConfig/tests - test_loader.py:1.8
Fred L. Drake, Jr.
fred@zope.com
Wed, 8 Jan 2003 00:51:03 -0500
Update of /cvs-repository/Packages/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv31666
Modified Files:
test_loader.py
Log Message:
Add test of file: URL normalization by the ZConfig.url module
functions.
=== Packages/ZConfig/tests/test_loader.py 1.7 => 1.8 ===
--- Packages/ZConfig/tests/test_loader.py:1.7 Wed Jan 8 00:41:44 2003
+++ Packages/ZConfig/tests/test_loader.py Wed Jan 8 00:50:56 2003
@@ -127,6 +127,20 @@
result2 = ZConfig.url.urlunsplit(result)
self.assertEqual(result2, url)
+ def test_file_url_normalization(self):
+ self.assertEqual(
+ ZConfig.url.urlnormalize("file:/abc/def"),
+ "file:///abc/def")
+ self.assertEqual(
+ ZConfig.url.urlunsplit(("file", "", "/abc/def", "", "")),
+ "file:///abc/def")
+ self.assertEqual(
+ ZConfig.url.urljoin("file:/abc/", "def"),
+ "file:///abc/def")
+ self.assertEqual(
+ ZConfig.url.urldefrag("file:/abc/def#frag"),
+ ("file:///abc/def", "frag"))
+
def test_suite():
return unittest.makeSuite(LoaderTestCase)