Coverage for mindsdb / integrations / handlers / firebird_handler / tests / test_firebird_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.firebird_handler.firebird_handler import FirebirdHandler
3from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
6class FirebirdHandlerTest(unittest.TestCase):
7 @classmethod
8 def setUpClass(cls):
9 cls.kwargs = {
10 "connection_data": {
11 "host": "localhost",
12 "database": r"C:\Users\minura\Documents\mindsdb\test.fdb",
13 "user": "sysdba",
14 "password": "password"
15 }
16 }
17 cls.handler = FirebirdHandler('test_firebird_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 test_tbl"
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_4_get_columns(self):
32 columns = self.handler.get_columns('test_tbl')
33 assert columns.type is not RESPONSE_TYPE.ERROR
36if __name__ == '__main__':
37 unittest.main()