Coverage for mindsdb / integrations / handlers / aurora_handler / tests / test_aurora_mysql_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.aurora_handler.aurora_handler import AuroraHandler
3from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
6class AuroraMySQLHandlerTest(unittest.TestCase):
7 @classmethod
8 def setUpClass(cls):
9 cls.kwargs = {
10 "host": "",
11 "port": 3306,
12 "user": "admin",
13 "password": "",
14 "database": "public",
15 "db_engine": "mysql"
16 }
17 cls.handler = AuroraHandler('test_aurora_mysql_handler', cls.kwargs)
19 def test_0_check_connection(self):
20 assert self.handler.check_connection()
22 def test_1_native_query_select(self):
23 query = "SELECT * FROM person"
24 result = self.handler.native_query(query)
25 assert result.type is RESPONSE_TYPE.TABLE
27 def test_2_get_tables(self):
28 tables = self.handler.get_tables()
29 assert tables.type is not RESPONSE_TYPE.ERROR
31 def test_3_get_columns(self):
32 columns = self.handler.get_columns('person')
33 assert columns.type is not RESPONSE_TYPE.ERROR
36if __name__ == '__main__':
37 unittest.main()