mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
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:
parent
767debb6aa
commit
70f996be24
3 changed files with 13 additions and 6 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue