Coverage for mindsdb / integrations / handlers / nuo_jdbc_handler / tests / test_nuo_handler.py: 0%
29 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
1import unittest
2from mindsdb.integrations.handlers.nuo_jdbc_handler.nuo_jdbc_handler import NuoHandler
3from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
6class NuoHandlerTest(unittest.TestCase):
7 @classmethod
8 def setUpClass(cls):
9 cls.kwargs = {
10 "connection_data": {
11 "host": "localhost",
12 "port": 48006,
13 "database": "test",
14 "schema": "hockey",
15 "user": "dba",
16 "password": "goalie",
17 "is_direct": "true",
18 }
19 }
20 cls.handler = NuoHandler('test_nuo_handler', **cls.kwargs)
22 def test_0_connect(self):
23 self.handler.connect()
25 def test_1_check_connection(self):
26 self.handler.check_connection()
28 def test_2_create(self):
29 res = self.handler.query('CREATE TABLE TESTTABLEX3 (ID INT PRIMARY KEY, NAME VARCHAR(14))')
30 assert res.type is RESPONSE_TYPE.OK
32 def test_3_insert(self):
33 res = self.handler.query("INSERT INTO TESTTABLEX3 VALUES (100,'ONE HUNDRED'),(200,'TWO HUNDRED'),(300,'THREE HUNDRED')")
34 assert res.type is RESPONSE_TYPE.OK
36 def test_4_select(self):
37 res = self.handler.query('SELECT * FROM HOCKEY')
38 assert res.type is RESPONSE_TYPE.TABLE
40 def test_5_get_tables(self):
41 res = self.handler.get_tables()
42 assert res.type is RESPONSE_TYPE.TABLE
44 def test_6_get_columns(self):
45 res = self.handler.get_columns("HOCKEY")
46 assert res.type is RESPONSE_TYPE.TABLE
49if __name__ == '__main__':
50 unittest.main()