#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2023/4/4 18:42 # @Author : old tom # @File : test_connector_factory.py # @Project : futool-db from unittest import TestCase from fudb.connectors.connector_factory import ConnFactory from fudb.dbapis.fu_db_api import select_one, count, select_all # @Desc : class TestConnFactory(TestCase): def test_get_conn(self): factory = ConnFactory('oracle', 'yngs_pro_constr', 'yngs_pro_constr', '172.16.1.36', 1523, 'testdb') conn = factory.get_conn() print(select_all(conn, 'select * from ODS_FINANCE_PLAN where rownum<=2'))