You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
futool-db/test/test_oracle_connector.py

21 lines
772 B

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2023/4/4 17:38
# @Author : old tom
# @File : test_oracle_connector.py
# @Project : futool-db
from unittest import TestCase
from fudb.connectors.dialect.dialect_connector import OracleConnector
from fudb.dbapis.fu_db_api import select_all
# @Desc :
class TestOracleConnector(TestCase):
def test_get_conn(self):
oc = OracleConnector('yngs_pro_constr', 'yngs_pro_constr', '172.16.1.36', 1523, 'testdb')
oc2 = OracleConnector('yngs_pro_constr', 'yngs_pro_constr', '172.16.1.36', 1523, 'testdb')
print(oc is oc2)
# conn = oc.get_conn()
# print(select_all(conn, 'select * from ODS_FINANCE_PLAN where rownum<=100'))
# # print(count(conn, 'ODS_FINANCE_PLAN'))