Coverage for mindsdb / integrations / handlers / pinot_handler / tests / test_pinot_handler.py: 0%
22 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.pinot_handler.pinot_handler import PinotHandler
3from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
6class PinotHandlerTest(unittest.TestCase):
7 @classmethod
8 def setUpClass(cls):
9 cls.kwargs = {
10 "host": "localhost",
11 "broker_port": 8000,
12 "controller_port": 9000,
13 "path": "/query/sql",
14 "scheme": "http"
15 }
16 cls.handler = PinotHandler('test_pinot_handler', cls.kwargs)
18 def test_0_check_connection(self):
19 assert self.handler.check_connection()
21 def test_1_native_query_select(self):
22 query = "SELECT * FROM baseballStats"
23 result = self.handler.native_query(query)
24 assert result.type is RESPONSE_TYPE.TABLE
26 def test_2_get_tables(self):
27 tables = self.handler.get_tables()
28 assert tables.type is not RESPONSE_TYPE.ERROR
30 def test_3_get_columns(self):
31 columns = self.handler.get_columns('baseballStats')
32 assert columns.type is not RESPONSE_TYPE.ERROR
35if __name__ == '__main__':
36 unittest.main()