]> granicus.if.org Git - python/commitdiff
Add trivial test cases for RAND_add() and RAND_status().
authorJeremy Hylton <jeremy@alum.mit.edu>
Thu, 18 Oct 2001 00:30:14 +0000 (00:30 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Thu, 18 Oct 2001 00:30:14 +0000 (00:30 +0000)
(The rest of the test cases are trivial, so I don't feel too bad.)

Lib/test/test_socket_ssl.py

index 334cbdfbd33abc40fe3eaf181ec2590743468dcf..9cf9cfeac60d7df13f4aeefd31d5b01647ed289e 100644 (file)
@@ -13,4 +13,18 @@ if not hasattr(socket, "ssl"):
 
 import urllib
 
-urllib.urlopen('https://sf.net')
+socket.RAND_status()
+try:
+    socket.RAND_egd(1)
+except TypeError:
+    pass
+else:
+    print "didn't raise TypeError"
+socket.RAND_add("this is a random string", 75.0)
+
+f = urllib.urlopen('https://sf.net')
+buf = f.read()
+f.close()
+
+
+