mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-21 08:10:24 +08:00
Add example
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
def check_search_area_result(content, expect_name):
|
||||
print(content, expect_name)
|
||||
found = False
|
||||
for item in content:
|
||||
if item['fullName'] == expect_name:
|
||||
found = True
|
||||
break
|
||||
assert found
|
||||
|
||||
|
||||
def exists_default_group(content, expect):
|
||||
found = False
|
||||
for item in content:
|
||||
if item['defaultGroup']:
|
||||
print('defaultGroup found, id={}, parentAreaId={}'.format(item['id'], item['parentAreaId']))
|
||||
found = True
|
||||
break
|
||||
assert found
|
||||
@@ -0,0 +1,3 @@
|
||||
def klook_len_eq(check_value, expect_value):
|
||||
# 校验列表、字典、字符串等长度是否相等
|
||||
assert len(check_value) == int(expect_value)
|
||||
Reference in New Issue
Block a user