From 3430324f7fcd38e9d1a8c045812e80376292788e Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Thu, 21 Aug 2008 17:56:23 +0000 Subject: Fix for http://bugs.python.org/setuptools/issue7 (backport from trunk) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4065943 --- setuptools/tests/test_packageindex.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'setuptools/tests/test_packageindex.py') diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 2d619a08..0231eda8 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -17,3 +17,11 @@ class TestPackageIndex(unittest.TestCase): self.assert_(url in str(v)) else: self.assert_(isinstance(v,urllib2.HTTPError)) + + def test_url_ok(self): + index = setuptools.package_index.PackageIndex( + hosts=('www.example.com',) + ) + url = 'file:///tmp/test_package_index' + self.assert_(index.url_ok(url, True)) + -- cgit v1.2.1