Add example

This commit is contained in:
Long
2019-12-11 15:19:57 +08:00
parent 3fd3c83509
commit db3b89d494
20 changed files with 233 additions and 0 deletions

View File

@@ -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

View File

@@ -0,0 +1,3 @@
def klook_len_eq(check_value, expect_value):
# 校验列表、字典、字符串等长度是否相等
assert len(check_value) == int(expect_value)