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.
18 lines
611 B
18 lines
611 B
2 years ago
|
#!/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'))
|