OmniSciDB  ba1bac9284
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 13 of file test_connection.py.

Member Function Documentation

def tests.test_connection.TestConnect.test_bad_binary_encryption_params (   self)

Definition at line 63 of file test_connection.py.

References omnisci.connection.connect().

63 
65  with pytest.raises(TypeError):
66  connect(
67  user='admin',
68  host=omniscihost,
69  dbname='omnisci',
70  protocol='http',
71  validate=False,
72  )
73 

+ Here is the call graph for this function:

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

Definition at line 37 of file test_connection.py.

References omnisci.connection.connect().

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

+ Here is the call graph for this function:

def tests.test_connection.TestConnect.test_close (   self)

Definition at line 22 of file test_connection.py.

References omnisci.connection.connect().

22 
23  def test_close(self):
24  conn = connect(
25  user='admin',
26  password='HyperInteractive',
27  host=omniscihost,
28  dbname='omnisci',
29  )
30  assert conn.closed == 0
31  conn.close()
32  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 33 of file test_connection.py.

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

Definition at line 14 of file test_connection.py.

References omnisci.connection.connect().

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

+ Here is the call graph for this function:

def tests.test_connection.TestConnect.test_raises_right_exception (   self)

Definition at line 18 of file test_connection.py.

References omnisci.connection.connect().

18 
20  with pytest.raises(OperationalError):
21  connect(host=omniscihost, 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 58 of file test_connection.py.

References omnisci.connection.connect().

58 
60  sessionid = 'ILoveDancingOnTables'
61  with pytest.raises(Error):
62  connect(sessionid=sessionid, host=omniscihost, protocol='binary')

+ Here is the call graph for this function:

def tests.test_connection.TestConnect.test_session_logon_success (   self)

Definition at line 47 of file test_connection.py.

References omnisci.connection.connect().

47 
49  conn = connect(
50  user='admin',
51  password='HyperInteractive',
52  host=omniscihost,
53  dbname='omnisci',
54  )
55  sessionid = conn._session
56  connnew = connect(sessionid=sessionid, host=omniscihost)
57  assert connnew._session == sessionid

+ Here is the call graph for this function:


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