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

@@ -189,6 +189,10 @@ class GreenSocket(object):
# act non-blocking
self.act_non_blocking = False
@property
def _sock(self):
return self
@property
def family(self):
return self.fd.family

View File

@@ -220,6 +220,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):
def test_duplex_response(self):