Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
backend_auto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邓莹莹
backend_auto
Commits
daa30090
Commit
daa30090
authored
Aug 18, 2021
by
edz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加case
parent
b9255e20
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
2 deletions
+43
-2
user_request.py
all_backend_api/user_request.py
+9
-0
user_request.yaml
all_backend_api/user_request.yaml
+14
-0
test_change_pwd.py
test_backend_case/user_case/test_change_pwd.py
+4
-2
change_pwd.yaml
test_backend_data/user_data/change_pwd.yaml
+16
-0
No files found.
all_backend_api/user_request.py
View file @
daa30090
...
...
@@ -157,6 +157,15 @@ class user_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"change_pwd"
])
#修改密码
def
change_pwd1
(
self
,
version
,
change_type
,
password
,
new_password
,
repeat_password
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"change_type"
]
=
change_type
self
.
params
[
"password"
]
=
password
self
.
params
[
"new_password"
]
=
new_password
self
.
params
[
"repeat_password"
]
=
repeat_password
return
self
.
api_send
(
self
.
data
[
"change_pwd1"
])
...
...
all_backend_api/user_request.yaml
View file @
daa30090
...
...
@@ -223,3 +223,17 @@ change_pwd:
repeat_password
:
${repeat_password}
json
:
{}
isLogin
:
1
#修改密码
change_pwd1
:
method
:
post
url
:
/api/user/change_pwd
params
:
version
:
${version}
data
:
password
:
${password}
change_type
:
${change_type}
new_password
:
${new_password}
repeat_password
:
${repeat_password}
json
:
{}
isLogin
:
1
test_backend_case/user_case/test_change_pwd.py
View file @
daa30090
...
...
@@ -12,7 +12,9 @@ class TestChangePwd:
@pytest.mark.parametrize
(
"param"
,
change_pwd_data
,
ids
=
change_pwd_case
)
def
test_change_pwd
(
self
,
param
):
r
=
user_request
()
.
change_pwd
(
param
[
"version"
],
param
[
"change_type"
],
param
[
"new_password"
],
param
[
"repeat_password"
])
if
r
[
"error_code"
]
==
22006
:
if
r
.
get
(
"error_code"
)
==
22006
:
assert
r
[
"message"
]
==
param
[
"assert"
]
elif
r
[
"error_code"
]
==
-
1
:
elif
r
.
get
(
"error_code"
)
==
-
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
elif
r
.
get
(
"error"
)
==
0
:
assert
r
[
"error"
]
==
param
[
"assert1"
]
test_backend_data/user_data/change_pwd.yaml
View file @
daa30090
...
...
@@ -31,3 +31,19 @@ change_pwd:
new_password
:
123456
repeat_password
:
1234567
assert
:
"
两次输入的密码不一致"
-
case
:
"
修改密码成功"
version
:
7.48.0
change_type
:
1
new_password
:
ceshi123
repeat_password
:
ceshi123
assert1
:
0
-
case
:
"
修改密码成功2"
version
:
7.47.0
change_type
:
1
new_password
:
123456
repeat_password
:
123456
assert1
:
0
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