def test_use_normal_tsocket_by_default(self): from thrift.transport import TSocket con = ThriftConnection() self.assertIs(con._tsocket_class, TSocket.TSocket)
def test_timeout_set(self): con = ThriftConnection(timeout=42) self.assertEquals(42, con.timeout)
def test_use_ssl_uses_ssl_socket(self): from thrift.transport import TSSLSocket con = ThriftConnection(use_ssl=True) self.assertIs(con._tsocket_class, TSSLSocket.TSSLSocket)