OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tests.test_connection.TestConnect Class Reference

Public Member Functions

def test_host_specified
 
def test_raises_right_exception
 
def test_close
 
def test_commit_noop
 
def test_bad_protocol
 
def test_session_logon_success
 
def test_session_logon_failure
 
def test_bad_binary_encryption_params
 

Detailed Description

Definition at line 14 of file test_connection.py.

Member Function Documentation

def tests.test_connection.TestConnect.test_bad_binary_encryption_params (   self)

Definition at line 64 of file test_connection.py.

References heavydb.connection.connect().

64 
66  with pytest.raises(TypeError):
67  connect(
68  user='admin',
69  host=heavydb_host,
70  dbname='heavyai',
71  protocol='http',
72  validate=False,
73  )
74 

+ Here is the call graph for this function:

def tests.test_connection.TestConnect.test_bad_protocol (   self,
  mock_client 
)

Definition at line 38 of file test_connection.py.

References heavydb.connection.connect().

38 
39  def test_bad_protocol(self, mock_client):
40  with pytest.raises(ValueError) as m:
41  connect(
42  user='user',
43  host=heavydb_host,
44  dbname='dbname',
45  protocol='fake-proto',
46  )
47  assert m.match('fake-proto')

+ Here is the call graph for this function:

def tests.test_connection.TestConnect.test_close (   self)

Definition at line 23 of file test_connection.py.

References heavydb.connection.connect().

23 
24  def test_close(self):
25  conn = connect(
26  user='admin',
27  password='HyperInteractive',
28  host=heavydb_host,
29  dbname='heavyai',
30  )
31  assert conn.closed == 0
32  conn.close()
33  assert conn.closed == 1

+ Here is the call graph for this function:

def tests.test_connection.TestConnect.test_commit_noop (   self,
  con 
)

Definition at line 34 of file test_connection.py.

34 
35  def test_commit_noop(self, con):
36  result = con.commit() # it worked
37  assert result is None
def tests.test_connection.TestConnect.test_host_specified (   self)

Definition at line 15 of file test_connection.py.

References heavydb.connection.connect().

15 
16  def test_host_specified(self):
17  with pytest.raises(TypeError):
18  connect(user='foo')

+ Here is the call graph for this function:

def tests.test_connection.TestConnect.test_raises_right_exception (   self)

Definition at line 19 of file test_connection.py.

References heavydb.connection.connect().

19 
21  with pytest.raises(OperationalError):
22  connect(host=heavydb_host, protocol='binary', port=1234)

+ Here is the call graph for this function:

def tests.test_connection.TestConnect.test_session_logon_failure (   self)

Definition at line 59 of file test_connection.py.

References heavydb.connection.connect().

59 
61  sessionid = 'ILoveDancingOnTables'
62  with pytest.raises(Error):
63  connect(sessionid=sessionid, host=heavydb_host, protocol='binary')

+ Here is the call graph for this function:

def tests.test_connection.TestConnect.test_session_logon_success (   self)

Definition at line 48 of file test_connection.py.

References heavydb.connection.connect().

48 
50  conn = connect(
51  user='admin',
52  password='HyperInteractive',
53  host=heavydb_host,
54  dbname='heavyai',
55  )
56  sessionid = conn._session
57  connnew = connect(sessionid=sessionid, host=heavydb_host)
58  assert connnew._session == sessionid

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: