Fix the availability statement for the spawn*() functions to reflect the
[python/dscho.git] / Lib / test / test_socket_ssl.py
blob2645876328cade70c3562fc97055e445f40c2824
1 # Test just the SSL support in the socket module, in a moderately bogus way.
3 import test_support
5 # Optionally test SSL support. This currently requires the 'network' resource
6 # as given on the regrtest command line. If not available, nothing after this
7 # line will be executed.
8 test_support.requires('network')
10 import socket
11 if not hasattr(socket, "ssl"):
12 raise test_support.TestSkipped("socket module has no ssl support")
14 import urllib
16 socket.RAND_status()
17 try:
18 socket.RAND_egd(1)
19 except TypeError:
20 pass
21 else:
22 print "didn't raise TypeError"
23 socket.RAND_add("this is a random string", 75.0)
25 f = urllib.urlopen('https://sf.net')
26 buf = f.read()
27 f.close()