]> granicus.if.org Git - python/commitdiff
One more fix to consider missing SSL support.
authorThomas Wouters <thomas@python.org>
Thu, 30 Aug 2007 22:35:31 +0000 (22:35 +0000)
committerThomas Wouters <thomas@python.org>
Thu, 30 Aug 2007 22:35:31 +0000 (22:35 +0000)
Lib/test/test_httplib.py

index 9238eea2029edb598d8e6678e2cb521718e6be25..36d6f7d75339507106d920eef45978d04a1b82b9 100644 (file)
@@ -199,8 +199,9 @@ class HTTPSTimeoutTest(TestCase):
 
     def test_attributes(self):
         # simple test to check it's storing it
-        h = httplib.HTTPSConnection(HOST, PORT, timeout=30)
-        self.assertEqual(h.timeout, 30)
+        if hasattr(httplib, 'HTTPSConnection'):
+            h = httplib.HTTPSConnection(HOST, PORT, timeout=30)
+            self.assertEqual(h.timeout, 30)
 
 def test_main(verbose=None):
     test_support.run_unittest(HeaderTests, OfflineTest, BasicTest, TimeoutTest, HTTPSTimeoutTest)