Exemple #1
0
 def test_use_normal_tsocket_by_default(self):
     from thrift.transport import TSocket
     con = ThriftConnection()
     self.assertIs(con._tsocket_class, TSocket.TSocket)
Exemple #2
0
 def test_timeout_set(self):
     con = ThriftConnection(timeout=42)
     self.assertEquals(42, con.timeout)
Exemple #3
0
 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)