[Zodb-checkins] CVS: Packages/ZConfig/tests - test_config.py:1.1.2.2
Fred L. Drake, Jr.
fred@zope.com
Thu, 2 Jan 2003 12:26:33 -0500
Update of /cvs-repository/Packages/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv20916/tests
Modified Files:
Tag: zconfig-schema-devel-branch
test_config.py
Log Message:
More consistency in URL handling. Make sure file: URLs *always* get the
"//" hostpart separator, even with Python 2.1, since urllib2.urlopen()
chokes if that is missing.
=== Packages/ZConfig/tests/test_config.py 1.1.2.1 => 1.1.2.2 ===
--- Packages/ZConfig/tests/test_config.py:1.1.2.1 Wed Dec 11 01:34:21 2002
+++ Packages/ZConfig/tests/test_config.py Thu Jan 2 12:26:30 2003
@@ -18,11 +18,11 @@
import tempfile
import unittest
import urllib
-import urlparse
import ZConfig
from ZConfig.Context import Context
+from ZConfig.url import urljoin
try:
__file__
@@ -37,7 +37,7 @@
class TestBase(unittest.TestCase):
def load(self, relurl, context=None):
- url = urlparse.urljoin(CONFIG_BASE, relurl)
+ url = urljoin(CONFIG_BASE, relurl)
if context is None:
conf = ZConfig.loadURL(url)
else:
@@ -191,7 +191,7 @@
self.assertEqual(L, L2)
def test_no_delegation(self):
- url = urlparse.urljoin(CONFIG_BASE, "simplesections.conf")
+ url = urljoin(CONFIG_BASE, "simplesections.conf")
context = NoDelegationContext()
self.assertRaises(ZConfig.ConfigurationTypeError,
context.loadURL, url)