Added timeout support to HTTPSConnection, through the

socket.create_connection function. Also added a small
test for this, and updated NEWS file.
This commit is contained in:
Facundo Batista 2007-05-21 17:32:32 +00:00
parent 767debb6aa
commit 70f996be24
3 changed files with 13 additions and 6 deletions

View file

@ -194,8 +194,16 @@ class TimeoutTest(TestCase):
httpConn.close()
class HTTPSTimeoutTest(TestCase):
# XXX Here should be tests for HTTPS, there isn't any right now!
def test_attributes(self):
# simple test to check it's storing it
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)
test_support.run_unittest(HeaderTests, OfflineTest, BasicTest, TimeoutTest, HTTPSTimeoutTest)
if __name__ == '__main__':
test_main()