Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-cmdc
Commits
9931c853
Commit
9931c853
authored
1 year ago
by
周念东
Browse files
Options
Download
Email Patches
Plain Diff
通用用户管理
parent
5ab7801d
master
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
air_case/cmdc_member_general/通用用户管理.air/通用用户管理.py
+41
-0
air_case/cmdc_member_general/通用用户管理.air/通用用户管理.py
data/cmdc_member_general/data
+16
-0
data/cmdc_member_general/data
with
57 additions
and
0 deletions
+57
-0
air_case/cmdc_member_general/通用用户管理.air/通用用户管理.py
0 → 100644
+
41
-
0
View file @
9931c853
# -*- encoding=utf8 -*-
__author__
=
"zhouniandong"
"""
case_tag:cmdc_api,cmdc通用用户管理,2293,2293-3,sit,bs
主数据平台:运营后台管理系统通用用户管理接口
"""
from
common.common_func
import
commonFuc
from
air_case.cmdc_login.后台管理系统登录.后台管理系统登录
import
CmdcDoLogin
import
requests
import
json
module
=
"cmdc_member_general"
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url1"
)
#print(url)
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcDoLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
cmdc_access_token
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload1"
)
"""
场景:通用用户管理()
用例名称:通用用户管理(通用用户管理)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
#print("\033[031mresult1============\033[0m",result)
result
=
json
.
loads
(
result
.
content
)
#print("\033[031mresult2============\033[0m",result)
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict1"
)
print
(
"
\033
[031mcheck_dict============
\033
[0m"
,
check_dict
)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
This diff is collapsed.
Click to expand it.
data/cmdc_member_general/data
0 → 100644
+
16
-
0
View file @
9931c853
#后台运营管理系统登录信息(上海公司)
"username": "admin"
"password": "Aa123456"
json_headers: {
"Content-Type": "application/json",
"Cmdc_access_token": "%s"
}
#查询意向客户页面
"url1": "/user/wxuser"
"payload1": {"realName":"","telephone":"","lienceNo":"","customerCompanyName":"","createTimes":[],"pageNumber":1,"pageSize":8,"total":0}
#预期结果
checkDict1: {"success":true,"code":"200","message":"OK"}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets