5 from heavydb
import OperationalError, connect
10 heavydb_host = os.environ.get(
'HEAVYDB_HOST',
'localhost')
13 @pytest.mark.usefixtures(
"heavydb_server")
16 with pytest.raises(TypeError):
20 with pytest.raises(OperationalError):
21 connect(host=heavydb_host, protocol=
'binary', port=1234)
26 password=
'HyperInteractive',
30 assert conn.closed == 0
32 assert conn.closed == 1
39 with pytest.raises(ValueError)
as m:
44 protocol=
'fake-proto',
46 assert m.match(
'fake-proto')
51 password=
'HyperInteractive',
55 sessionid = conn._session
56 connnew =
connect(sessionid=sessionid, host=heavydb_host)
57 assert connnew._session == sessionid
60 sessionid =
'ILoveDancingOnTables'
61 with pytest.raises(Error):
62 connect(sessionid=sessionid, host=heavydb_host, protocol=
'binary')
65 with pytest.raises(TypeError):
78 'heavydb://admin:HyperInteractive@{0}:6274/heavyai?'
79 'protocol=binary'.format(heavydb_host)
92 assert result == expected
96 'heavydb://admin:HyperInteractive@{0}:6274/heavyai?'
97 'protocol=binary'.format(heavydb_host)
99 with pytest.raises(TypeError):
100 connect(uri=uri, user=
'my user')
117 is_reserved_keyword=
False,
131 is_reserved_keyword=
False,
145 is_reserved_keyword=
False,
159 is_reserved_keyword=
False,
173 is_reserved_keyword=
False,
187 is_reserved_keyword=
False,
255 assert result == expected
def test_session_logon_failure
def _extract_column_details
def test_raises_right_exception
def test_bad_binary_encryption_params
def test_session_logon_success