This commit is contained in:
Ryan Williams
2009-08-31 14:16:15 -04:00
parent 3cf135ed95
commit 7e7057fe6d
2 changed files with 13 additions and 0 deletions

View File

@@ -188,6 +188,10 @@ class GreenSocket(object):
# when client calls setblocking(0) or settimeout(0) the socket must
# act non-blocking
self.act_non_blocking = False
@property
def _sock(self):
return self
@property
def family(self):

View File

@@ -219,6 +219,15 @@ class TestGreenIo(LimitedTestCase):
self.assert_(len(results1) > 0)
self.assert_(len(results2) > 0)
def test_wrap_socket(self):
try:
import ssl
except ImportError:
pass # pre-2.6
else:
sock = api.tcp_listener(('127.0.0.1', 0))
ssl_sock = ssl.wrap_socket(sock)
class SSLTest(LimitedTestCase):