Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
willdesk_apiauto
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
29
Issues
29
List
Boards
Labels
Service Desk
Milestones
Merge Requests
29
Merge Requests
29
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
桦生 詹
willdesk_apiauto
Commits
65a6b938
Commit
65a6b938
authored
May 14, 2024
by
zhanhuasheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建数据库实例对象
parent
6e9de43d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
TestData/account/account_test_data.py
TestData/account/account_test_data.py
+5
-1
TestFile/account/account_selectLanguage.py
TestFile/account/account_selectLanguage.py
+2
-4
No files found.
TestData/account/account_test_data.py
View file @
65a6b938
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'
))
TestFile/account/account_selectLanguage.py
View file @
65a6b938
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment