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
b9255e20
Commit
b9255e20
authored
Aug 18, 2021
by
edz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
忘记密码-设置密码
parent
78adebda
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
1 deletion
+78
-1
user_request.py
all_backend_api/user_request.py
+12
-0
user_request.yaml
all_backend_api/user_request.yaml
+13
-0
path_setting.py
path_setting.py
+2
-1
test_change_pwd.py
test_backend_case/user_case/test_change_pwd.py
+18
-0
change_pwd.yaml
test_backend_data/user_data/change_pwd.yaml
+33
-0
No files found.
all_backend_api/user_request.py
View file @
b9255e20
...
...
@@ -148,6 +148,15 @@ class user_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"favors_answers"
])
#忘记密码-设置密码
def
change_pwd
(
self
,
version
,
change_type
,
new_password
,
repeat_password
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"change_type"
]
=
change_type
self
.
params
[
"new_password"
]
=
new_password
self
.
params
[
"repeat_password"
]
=
repeat_password
return
self
.
api_send
(
self
.
data
[
"change_pwd"
])
...
...
@@ -188,6 +197,9 @@ if __name__ == '__main__':
# 我的-收藏-日记贴
print
(
user_request
()
.
favors_topics
(
0
,
10
))
#忘记密码-修改密码
print
(
user_request
()
.
change_pwd
(
'7.48.0'
,
1
,
123456
,
123456
))
all_backend_api/user_request.yaml
View file @
b9255e20
...
...
@@ -210,3 +210,16 @@ favors_answers:
data
:
{}
json
:
{}
isLogin
:
1
#忘记密码-设置密码
change_pwd
:
method
:
post
url
:
/api/user/change_pwd
params
:
version
:
${version}
data
:
change_type
:
${change_type}
new_password
:
${new_password}
repeat_password
:
${repeat_password}
json
:
{}
isLogin
:
1
path_setting.py
View file @
b9255e20
...
...
@@ -639,7 +639,8 @@ BEAUTY_POST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data"
#直播关注/取关主播
FOLLOW_ADD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"follow_add.yaml"
)
FOLLOW_DEL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"follow_del.yaml"
)
#忘记密码-设置密码
CHANGE_PWD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"change_pwd.yaml"
)
#主播-推荐袋美购列表展示
LIVESERVICES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_live_request.yaml"
)
...
...
test_backend_case/user_case/test_change_pwd.py
0 → 100644
View file @
b9255e20
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.user_request
import
user_request
class
TestChangePwd
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CHANGE_PWD
)
change_pwd_case
,
change_pwd_data
=
get_ids
(
data
,
"change_pwd"
)
@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
:
assert
r
[
"message"
]
==
param
[
"assert"
]
elif
r
[
"error_code"
]
==
-
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
test_backend_data/user_data/change_pwd.yaml
0 → 100644
View file @
b9255e20
change_pwd
:
#忘记密码-设置密码
-
case
:
"
新密码不可与旧密码相同"
version
:
7.47.0
change_type
:
1
new_password
:
123456
repeat_password
:
123456
assert
:
"
新密码不可与旧密码相同"
#error_code: 22006
-
case
:
"
密码不符合要求"
version
:
7.48.0
change_type
:
1
new_password
:
123456
repeat_password
:
123456
assert
:
"
密码应包含数字、大小写字母、特殊字符的两种或两种以上"
-
case
:
"
密码长度不对"
version
:
7.48.0
change_type
:
1
new_password
:
12345
repeat_password
:
12345
assert
:
"
密码长度在6-16位之间"
-
case
:
"
两次输入密码不一致"
version
:
7.48.0
change_type
:
1
new_password
:
123456
repeat_password
:
1234567
assert
:
"
两次输入的密码不一致"
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