Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zmops-test
Project
Overview
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
sanshi
zmops-test
Commits
6a4af4c9
Commit
6a4af4c9
authored
Dec 20, 2019
by
sanshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户设置
parent
058d75f7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
29 deletions
+9
-29
test_settings_changePassword.py
WorkCase/APP/Settings/test_settings_changePassword.py
+3
-29
test_settings_get_member.py
WorkCase/APP/Settings/test_settings_get_member.py
+6
-0
No files found.
WorkCase/APP/Settings/test_settings_changePassword.py
View file @
6a4af4c9
...
...
@@ -69,37 +69,11 @@ class TestSettingsChangePassword(object):
session
=
UtilsDataBase
()
.
conn_mysql
(
db_url
=
self
.
db_url
,
db_port
=
self
.
db_port
,
db_base
=
self
.
db_base
,
db_user
=
self
.
db_user
,
db_pw
=
self
.
db_pw
)
return
session
@allure.title
(
"settings.changePassword:token未传"
)
@allure.story
(
"修改密码:token未传"
)
@allure.severity
(
"blocker"
)
def
test_case_01
(
self
):
response
=
self
.
app
.
settings_changePassword
()
self
.
app
.
check_code
(
response
=
response
,
code
=
2001
)
self
.
app
.
check_msg
(
response
=
response
,
msg
=
"token不存在"
)
@allure.title
(
"settings.changePassword:token的用户已删除"
)
@allure.story
(
"修改密码:token的用户已删除"
)
@allure.severity
(
"blocker"
)
def
test_case_02
(
self
):
self
.
app
.
update_members_del_flag
(
session
=
self
.
db_session
(),
members_id
=
self
.
base_id
,
value
=
CaseBase
()
.
del_flag
[
"ON"
])
response
=
self
.
app
.
settings_changePassword
(
token
=
self
.
token
)
self
.
app
.
check_code
(
response
=
response
,
code
=
2004
)
self
.
app
.
check_msg
(
response
=
response
,
msg
=
"用户不存在"
)
@allure.title
(
"settings.changePassword:token的用户已禁用"
)
@allure.story
(
"修改密码:token的用户已禁用"
)
@allure.severity
(
"blocker"
)
def
test_case_03
(
self
):
self
.
app
.
update_members_status
(
session
=
self
.
db_session
(),
members_id
=
self
.
base_id
,
value
=
CaseBase
()
.
status
[
"OFF"
])
response
=
self
.
app
.
settings_changePassword
(
token
=
self
.
token
)
self
.
app
.
check_code
(
response
=
response
,
code
=
2003
)
self
.
app
.
check_msg
(
response
=
response
,
msg
=
"账户已被禁用"
)
@allure.title
(
"settings.changePassword:成功修改密码"
)
@allure.story
(
"修改密码:成功修改密码"
)
@allure.severity
(
"blocker"
)
def
test_case_0
4
(
self
):
name
=
self
.
base_name
+
"0
4
"
def
test_case_0
1
(
self
):
name
=
self
.
base_name
+
"0
1
"
member_id
=
self
.
app
.
case_create_member
(
name
=
name
,
password
=
self
.
base_password
,
role
=
0
)
new_password
=
"Test"
response
=
self
.
app
.
settings_changePassword
(
token
=
self
.
token
,
memberId
=
member_id
,
oldPassword
=
self
.
base_password
,
...
...
@@ -108,7 +82,7 @@ class TestSettingsChangePassword(object):
@allure.title
(
"settings.changePassword:token错误"
)
@allure.story
(
"变更密码:token错误"
)
def
test_case_0
5
(
self
):
def
test_case_0
2
(
self
):
response
=
self
.
app
.
settings_changePassword
(
token
=
"Test"
,
memberId
=
self
.
base_id
)
self
.
app
.
check_code
(
response
=
response
,
code
=
2001
)
self
.
app
.
check_msg
(
response
=
response
,
msg
=
"token错误,请重新登录"
)
...
...
WorkCase/APP/Settings/test_settings_get_member.py
View file @
6a4af4c9
...
...
@@ -6,6 +6,8 @@
from
__future__
import
division
import
time
from
WorkCase
import
CaseBase
from
WorkCase.APP
import
AppBase
from
WorkUtils.UtilsLog
import
UtilsLog
...
...
@@ -65,6 +67,7 @@ class TestSettingsGetMember(object):
@allure.story
(
"查询我的设置:token未传"
)
@allure.severity
(
"blocker"
)
def
test_case_01
(
self
):
time
.
sleep
(
10
)
response
=
self
.
app
.
settings_get_member
(
memberId
=
self
.
base_id
)
self
.
app
.
check_code
(
response
=
response
,
code
=
2001
)
self
.
app
.
check_msg
(
response
=
response
,
msg
=
"token不存在"
)
...
...
@@ -74,6 +77,7 @@ class TestSettingsGetMember(object):
@allure.severity
(
"blocker"
)
def
test_case_02
(
self
):
self
.
app
.
update_members_del_flag
(
session
=
self
.
db_session
(),
members_id
=
self
.
base_id
,
value
=
CaseBase
()
.
del_flag
[
"ON"
])
time
.
sleep
(
10
)
response
=
self
.
app
.
settings_get_member
(
token
=
self
.
token
,
memberId
=
self
.
base_id
)
self
.
app
.
check_code
(
response
=
response
,
code
=
2004
)
self
.
app
.
check_msg
(
response
=
response
,
msg
=
"用户不存在"
)
...
...
@@ -83,6 +87,7 @@ class TestSettingsGetMember(object):
@allure.severity
(
"blocker"
)
def
test_case_03
(
self
):
self
.
app
.
update_members_status
(
session
=
self
.
db_session
(),
members_id
=
self
.
base_id
,
value
=
CaseBase
()
.
status
[
"OFF"
])
time
.
sleep
(
10
)
response
=
self
.
app
.
settings_get_member
(
token
=
self
.
token
,
memberId
=
self
.
base_id
)
self
.
app
.
check_code
(
response
=
response
,
code
=
2003
)
self
.
app
.
check_msg
(
response
=
response
,
msg
=
"账户已被禁用"
)
...
...
@@ -91,6 +96,7 @@ class TestSettingsGetMember(object):
@allure.story
(
"查询我的设置:token错误"
)
def
test_case_04
(
self
):
self
.
app
.
update_members_status
(
session
=
self
.
db_session
(),
members_id
=
self
.
base_id
,
value
=
1
)
time
.
sleep
(
10
)
response
=
self
.
app
.
settings_get_member
(
token
=
"Test"
,
memberId
=
self
.
base_id
)
self
.
app
.
check_code
(
response
=
response
,
code
=
2001
)
self
.
app
.
check_msg
(
response
=
response
,
msg
=
"token错误,请重新登录"
)
...
...
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