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
54b13637
Commit
54b13637
authored
Dec 13, 2019
by
sanshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询优化
parent
1f9801e1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
23 deletions
+14
-23
test_addressbook_get.py
WorkCase/APP/AddressBook/test_addressbook_get.py
+3
-3
test_businesses_get.py
WorkCase/APP/Businesses/test_businesses_get.py
+4
-4
test_members_get.py
WorkCase/APP/Members/test_members_get.py
+3
-3
test_rule_get.py
WorkCase/APP/Rule/test_rule_get.py
+1
-1
test_rule_list.py
WorkCase/APP/Rule/test_rule_list.py
+2
-9
test_settings_get_member.py
WorkCase/APP/Settings/test_settings_get_member.py
+1
-3
No files found.
WorkCase/APP/AddressBook/test_addressbook_get.py
View file @
54b13637
...
@@ -152,7 +152,7 @@ class TestAddressBookGet(object):
...
@@ -152,7 +152,7 @@ class TestAddressBookGet(object):
response
=
self
.
app
.
addressbook_get
(
token
=
self
.
token
,
name
=
name
)
response
=
self
.
app
.
addressbook_get
(
token
=
self
.
token
,
name
=
name
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_
data_keyValue
(
response
=
response
,
_key
=
"name"
,
_value
=
name
)
self
.
app
.
check_
keyValue
(
_json
=
UtilsResponse
()
.
get_data_list
(
response
=
response
)
,
_key
=
"name"
,
_value
=
name
)
@allure.title
(
"addressbook.get:available=0查询"
)
@allure.title
(
"addressbook.get:available=0查询"
)
@allure.story
(
"查询地址簿:available=0查询"
)
@allure.story
(
"查询地址簿:available=0查询"
)
...
@@ -162,7 +162,7 @@ class TestAddressBookGet(object):
...
@@ -162,7 +162,7 @@ class TestAddressBookGet(object):
response
=
self
.
app
.
addressbook_get
(
token
=
self
.
token
,
available
=
CaseBase
()
.
available
[
"ON"
])
response
=
self
.
app
.
addressbook_get
(
token
=
self
.
token
,
available
=
CaseBase
()
.
available
[
"ON"
])
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_
data_keyValue
(
response
=
response
,
_key
=
"available"
,
_value
=
CaseBase
()
.
available
[
"ON"
])
self
.
app
.
check_
keyValue
(
_json
=
UtilsResponse
()
.
get_data_list
(
response
=
response
)
,
_key
=
"available"
,
_value
=
CaseBase
()
.
available
[
"ON"
])
@allure.title
(
"addressbook.get:available=1查询"
)
@allure.title
(
"addressbook.get:available=1查询"
)
@allure.story
(
"查询地址簿:available=1查询"
)
@allure.story
(
"查询地址簿:available=1查询"
)
...
@@ -172,7 +172,7 @@ class TestAddressBookGet(object):
...
@@ -172,7 +172,7 @@ class TestAddressBookGet(object):
response
=
self
.
app
.
addressbook_get
(
token
=
self
.
token
,
available
=
CaseBase
()
.
available
[
"OFF"
])
response
=
self
.
app
.
addressbook_get
(
token
=
self
.
token
,
available
=
CaseBase
()
.
available
[
"OFF"
])
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_
data_keyValue
(
response
=
response
,
_key
=
"available"
,
_value
=
CaseBase
()
.
available
[
"OFF"
])
self
.
app
.
check_
keyValue
(
_json
=
UtilsResponse
()
.
get_data_list
(
response
=
response
)
,
_key
=
"available"
,
_value
=
CaseBase
()
.
available
[
"OFF"
])
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
WorkCase/APP/Businesses/test_businesses_get.py
View file @
54b13637
...
@@ -143,7 +143,7 @@ class TestBusinessesGet(object):
...
@@ -143,7 +143,7 @@ class TestBusinessesGet(object):
self
.
app
.
case_create_businesses
(
name
=
name
,
_type
=
self
.
base_type_1
)
self
.
app
.
case_create_businesses
(
name
=
name
,
_type
=
self
.
base_type_1
)
response
=
self
.
app
.
businesses_get
(
token
=
self
.
token
,
businessesName
=
name
)
response
=
self
.
app
.
businesses_get
(
token
=
self
.
token
,
businessesName
=
name
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_
data_keyValue
(
response
=
response
,
_key
=
"name"
,
_value
=
name
)
self
.
app
.
check_
keyValue
(
_json
=
UtilsResponse
()
.
get_data_list
(
response
=
response
)
,
_key
=
"name"
,
_value
=
name
)
@allure.title
(
"businesses.get:type查询"
)
@allure.title
(
"businesses.get:type查询"
)
@allure.story
(
"查询业务:type查询"
)
@allure.story
(
"查询业务:type查询"
)
...
@@ -152,7 +152,7 @@ class TestBusinessesGet(object):
...
@@ -152,7 +152,7 @@ class TestBusinessesGet(object):
self
.
app
.
case_create_businesses
(
name
=
name
,
_type
=
self
.
base_type_1
)
self
.
app
.
case_create_businesses
(
name
=
name
,
_type
=
self
.
base_type_1
)
response
=
self
.
app
.
businesses_get
(
token
=
self
.
token
,
_type
=
self
.
base_type_1
)
response
=
self
.
app
.
businesses_get
(
token
=
self
.
token
,
_type
=
self
.
base_type_1
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_
data_keyValue
(
response
=
response
,
_key
=
"type"
,
_value
=
self
.
base_type_1
)
self
.
app
.
check_
keyValue
(
_json
=
UtilsResponse
()
.
get_data_list
(
response
=
response
)
,
_key
=
"type"
,
_value
=
self
.
base_type_1
)
@allure.title
(
"businesses.get:principal查询手机号"
)
@allure.title
(
"businesses.get:principal查询手机号"
)
@allure.story
(
"查询业务:principal查询手机号"
)
@allure.story
(
"查询业务:principal查询手机号"
)
...
@@ -161,7 +161,7 @@ class TestBusinessesGet(object):
...
@@ -161,7 +161,7 @@ class TestBusinessesGet(object):
self
.
app
.
case_create_businesses
(
name
=
name
,
_type
=
self
.
base_type_1
,
principalName
=
"Test"
,
principalPhone
=
"10086"
)
self
.
app
.
case_create_businesses
(
name
=
name
,
_type
=
self
.
base_type_1
,
principalName
=
"Test"
,
principalPhone
=
"10086"
)
response
=
self
.
app
.
businesses_get
(
token
=
self
.
token
,
principal
=
"Test"
)
response
=
self
.
app
.
businesses_get
(
token
=
self
.
token
,
principal
=
"Test"
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_
data_keyValue
(
response
=
response
,
_key
=
"principalName"
,
_value
=
"Test"
)
self
.
app
.
check_
keyValue
(
_json
=
UtilsResponse
()
.
get_data_list
(
response
=
response
)
,
_key
=
"principalName"
,
_value
=
"Test"
)
@allure.title
(
"businesses.get:principal查询姓名"
)
@allure.title
(
"businesses.get:principal查询姓名"
)
@allure.story
(
"查询业务:principal查询姓名"
)
@allure.story
(
"查询业务:principal查询姓名"
)
...
@@ -170,7 +170,7 @@ class TestBusinessesGet(object):
...
@@ -170,7 +170,7 @@ class TestBusinessesGet(object):
self
.
app
.
case_create_businesses
(
name
=
name
,
_type
=
self
.
base_type_1
,
principalName
=
"Test"
,
principalPhone
=
"10087"
)
self
.
app
.
case_create_businesses
(
name
=
name
,
_type
=
self
.
base_type_1
,
principalName
=
"Test"
,
principalPhone
=
"10087"
)
response
=
self
.
app
.
businesses_get
(
token
=
self
.
token
,
principal
=
"10087"
)
response
=
self
.
app
.
businesses_get
(
token
=
self
.
token
,
principal
=
"10087"
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_
data_keyValue
(
response
=
response
,
_key
=
"principalPhone"
,
_value
=
"10087"
)
self
.
app
.
check_
keyValue
(
_json
=
UtilsResponse
()
.
get_data_list
(
response
=
response
)
,
_key
=
"principalPhone"
,
_value
=
"10087"
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
WorkCase/APP/Members/test_members_get.py
View file @
54b13637
...
@@ -115,7 +115,7 @@ class TestMembersGet(object):
...
@@ -115,7 +115,7 @@ class TestMembersGet(object):
self
.
app
.
case_create_member
(
name
=
name
,
password
=
self
.
base_password
,
role
=
0
)
self
.
app
.
case_create_member
(
name
=
name
,
password
=
self
.
base_password
,
role
=
0
)
response
=
self
.
app
.
members_get
(
token
=
self
.
token
,
name
=
name
)
response
=
self
.
app
.
members_get
(
token
=
self
.
token
,
name
=
name
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_
data_keyValue
(
response
=
response
,
_key
=
"name"
,
_value
=
name
)
self
.
app
.
check_
keyValue
(
_json
=
UtilsResponse
()
.
get_data_list
(
response
=
response
)
,
_key
=
"name"
,
_value
=
name
)
@allure.title
(
"members.get:status=0查询"
)
@allure.title
(
"members.get:status=0查询"
)
@allure.story
(
"查询用户:status=0查询"
)
@allure.story
(
"查询用户:status=0查询"
)
...
@@ -124,7 +124,7 @@ class TestMembersGet(object):
...
@@ -124,7 +124,7 @@ class TestMembersGet(object):
self
.
app
.
case_create_member
(
name
=
name
,
password
=
self
.
base_password
,
role
=
0
)
self
.
app
.
case_create_member
(
name
=
name
,
password
=
self
.
base_password
,
role
=
0
)
response
=
self
.
app
.
members_get
(
token
=
self
.
token
,
name
=
name
,
status
=
0
)
response
=
self
.
app
.
members_get
(
token
=
self
.
token
,
name
=
name
,
status
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_
data_keyValue
(
response
=
response
,
_key
=
"status"
,
_value
=
0
)
self
.
app
.
check_
keyValue
(
_json
=
UtilsResponse
()
.
get_data_list
(
response
=
response
)
,
_key
=
"status"
,
_value
=
0
)
@allure.title
(
"members.get:status=1查询"
)
@allure.title
(
"members.get:status=1查询"
)
@allure.story
(
"查询用户:status=1查询"
)
@allure.story
(
"查询用户:status=1查询"
)
...
@@ -133,7 +133,7 @@ class TestMembersGet(object):
...
@@ -133,7 +133,7 @@ class TestMembersGet(object):
self
.
app
.
case_create_member
(
name
=
name
,
password
=
self
.
base_password
,
role
=
0
)
self
.
app
.
case_create_member
(
name
=
name
,
password
=
self
.
base_password
,
role
=
0
)
response
=
self
.
app
.
members_get
(
token
=
self
.
token
,
name
=
name
,
status
=
1
)
response
=
self
.
app
.
members_get
(
token
=
self
.
token
,
name
=
name
,
status
=
1
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_
data_keyValue
(
response
=
response
,
_key
=
"status"
,
_value
=
1
)
self
.
app
.
check_
keyValue
(
_json
=
UtilsResponse
()
.
get_data_list
(
response
=
response
)
,
_key
=
"status"
,
_value
=
1
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
WorkCase/APP/Rule/test_rule_get.py
View file @
54b13637
...
@@ -171,7 +171,7 @@ class TestRuleGet(object):
...
@@ -171,7 +171,7 @@ class TestRuleGet(object):
response
=
self
.
app
.
rule_get
(
token
=
self
.
token
,
severity
=
2
)
response
=
self
.
app
.
rule_get
(
token
=
self
.
token
,
severity
=
2
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_
data_keyValue
(
response
=
response
,
_key
=
"severity"
,
_value
=
2
)
self
.
app
.
check_
keyValue
(
_json
=
UtilsResponse
()
.
get_data_list
(
response
=
response
)
,
_key
=
"severity"
,
_value
=
2
)
@allure.title
(
"rule.get:item_id查询"
)
@allure.title
(
"rule.get:item_id查询"
)
@allure.story
(
"查询告警规则:item_id查询"
)
@allure.story
(
"查询告警规则:item_id查询"
)
...
...
WorkCase/APP/Rule/test_rule_list.py
View file @
54b13637
...
@@ -177,11 +177,7 @@ class TestRuleList(object):
...
@@ -177,11 +177,7 @@ class TestRuleList(object):
response
=
self
.
app
.
rule_list
(
token
=
self
.
token
,
ruleName
=
self
.
base_name
)
response
=
self
.
app
.
rule_list
(
token
=
self
.
token
,
ruleName
=
self
.
base_name
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_keyValue
(
_json
=
UtilsResponse
()
.
get_data
(
response
=
response
),
_key
=
"name"
,
_value
=
self
.
base_name
,
isIn
=
1
)
data
=
UtilsResponse
()
.
get_data
(
response
=
response
)
assert
data
!=
[]
for
x
,
y
in
enumerate
(
data
):
assert
self
.
base_name
in
y
[
"name"
]
@allure.title
(
"rule.list:ruleName精确查询"
)
@allure.title
(
"rule.list:ruleName精确查询"
)
@allure.story
(
"查询告警规则下拉框:ruleName精确查询"
)
@allure.story
(
"查询告警规则下拉框:ruleName精确查询"
)
...
@@ -200,10 +196,7 @@ class TestRuleList(object):
...
@@ -200,10 +196,7 @@ class TestRuleList(object):
response
=
self
.
app
.
rule_list
(
token
=
self
.
token
,
ruleName
=
name
)
response
=
self
.
app
.
rule_list
(
token
=
self
.
token
,
ruleName
=
name
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
data
=
UtilsResponse
()
.
get_data
(
response
=
response
)
self
.
app
.
check_keyValue
(
_json
=
UtilsResponse
()
.
get_data
(
response
=
response
),
_key
=
"name"
,
_value
=
name
)
assert
data
!=
[]
for
x
,
y
in
enumerate
(
data
):
assert
y
[
"name"
]
==
name
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
WorkCase/APP/Settings/test_settings_get_member.py
View file @
54b13637
...
@@ -101,9 +101,7 @@ class TestSettingsGetMember(object):
...
@@ -101,9 +101,7 @@ class TestSettingsGetMember(object):
def
test_case_05
(
self
):
def
test_case_05
(
self
):
response
=
self
.
app
.
settings_get_member
(
token
=
self
.
token
,
memberId
=
self
.
base_id
)
response
=
self
.
app
.
settings_get_member
(
token
=
self
.
token
,
memberId
=
self
.
base_id
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_code
(
response
=
response
,
code
=
0
)
self
.
app
.
check_keyValue
(
_json
=
UtilsResponse
()
.
get_data
(
response
=
response
),
_key
=
"roleName"
,
_value
=
"管理员角色"
)
data
=
UtilsResponse
()
.
get_data
(
response
=
response
)
assert
"管理员角色"
==
data
[
"roleName"
]
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
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