Commit 83e69fb3 by demo1

api autotest v 0.2

parent 396a2719
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
import pymysql import pymysql
from APIAutoTest_3 import log_decorator from APIAutoTest_3 import log_decorator
from APIAutoTest_v3.common.read_basic_ini import ReadBasicIni from APIAutoTest_3.common.read_basic_ini import ReadBasicIni
class DB: class DB:
...@@ -18,11 +18,11 @@ class DB: ...@@ -18,11 +18,11 @@ class DB:
def __init__(self): def __init__(self):
ini = ReadBasicIni() ini = ReadBasicIni()
self.conn = pymysql.connect( self.conn = pymysql.connect(
host=ini.get_database_conn_msg("host"), host=ini.get_sql_connect("host"),
port=int(ini.get_database_conn_msg("port")), port=int(ini.get_sql_connect("port")),
user=ini.get_database_conn_msg("user"), user=ini.get_sql_connect("user"),
password=ini.get_database_conn_msg("pwd"), password=ini.get_sql_connect("pwd"),
database=ini.get_database_conn_msg("database"), database=ini.get_sql_connect("database"),
charset="utf8" charset="utf8"
) )
self.cursor = self.conn.cursor() self.cursor = self.conn.cursor()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment