Commit 65a6b938 authored by zhanhuasheng's avatar zhanhuasheng

新建数据库实例对象

parent 6e9de43d
from Utils.global_variate import Global
from Utils.sql_handler import SqlHandler
from Utils.config_handler import base_config
class accountData(Global):
origin_language = 'en' #原始语言
......@@ -7,4 +9,6 @@ class accountData(Global):
old_name = 'zhs' #旧名字
new_name = 'auto_test' #新名字
trans_key = 'account.account'
\ No newline at end of file
trans_key = 'account.account'
accountData_sql_handler = SqlHandler(address=base_config.get_value('mysql','address'),port=int(base_config.get_value('mysql','port')),account=base_config.get_value('mysql','account'),password=base_config.get_value('mysql','password'))
from Utils.sql_handler import test_env_conn
from TestData.account.account_test_data import accountData
import time
time.sleep(2)
select_sql = f'select * from willdesk.customer_service where id = {accountData.userId}'
select_result = test_env_conn.select_one_value(sql=select_sql)
select_result = accountData.accountData_sql_handler.select_one_value(sql=select_sql)
setattr(accountData, 'local_lang', select_result['local_lang'])
accountData.accountData_sql_handler.close_db()
\ No newline at end of file
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