Commit a59776b9 authored by 陈雪's avatar 陈雪

hebing

parents 492ce719 9624c481
......@@ -26,5 +26,9 @@ if __name__ == '__main__':
print(web2_request().servicereview_option("209989", "1", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web2_request().tag_all())
print(web2_request().tag_all())
......@@ -42,10 +42,13 @@ servicereview_option:
tag_all:
method: get
url: /api/web2/tag/all
param: {}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
isLogin: 1
......@@ -6,7 +6,6 @@ class web_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.ACCOUNT_URL)
def account_unreadbadgecount(self) :
return self.api_send(self.data["account_unreadbadgecount"])
......
......@@ -17,6 +17,7 @@ article_videotoken:
isLogin: 1
doctor_submechanisms:
method: get
url: /api/web/doctor/submechanisms
......
......@@ -27,7 +27,7 @@ class BaseRequest:
return yaml.safe_load(f)
# 调用yaml加载文件API加载
def api_load(self, path):
def api_load(self, path: object) -> object:
return self.yaml_load(path)
def jsonpath(self, path, r=None, **kwargs):
......
......@@ -13,7 +13,11 @@ class TestServiceList:
@pytest.mark.parametrize("params",ServiceList_data,ids=ServiceList_case)
def test_ServiceList(self,params):
r = web2_request().service_list(params['page'],params['pagesize'],params['is_online'])
print("======",r)
if r["error"] == 0:
assert r["data"]["page"] == params["assert"]
elif r["error"] == 1:
......
......@@ -15,7 +15,7 @@ class TestServiceReviewList:
def test_ServiceReviewList(self, params):
r = web2_request().service_review_list(params['page'], params['pagesize'], params['type'])
print("---------",r)
print("--------",r)
print("....")
if r["error"] == 0:
......
......@@ -15,7 +15,7 @@ class TestServicereviewOption:
def test_ServicereviewOption(self, params):
r = web2_request().servicereview_option(params['id'], params['type'], params['csrfmiddlewaretoken'])
print("---------",r)
print("--------",r)
if r["error"] == 0:
assert r["error"] == params["assert"]
......
......@@ -15,7 +15,7 @@ class TestTagAll:
def test_TagAll(self, param):
r = web2_request().tag_all()
print("---------",r)
print("--------",r)
if r["error"] == 0:
assert r["error"] == param["assert"]
......
......@@ -15,7 +15,7 @@ class TestAccountUnreadbadgecount:
def test_AccountUnreadbadgecount(self,param):
r = web_request().account_unreadbadgecount()
print("======",r)
print("=====",r)
if r["error"] == 0:
assert r["error"] == param["assert"]
# elif r["error"] == 1:
......
......@@ -15,7 +15,7 @@ class TestArticleVideotoken:
def test_ArticleVideotokent(self,param):
r = web_request().article_videotoken()
print("======",r)
print("=======",r)
if r["error"] == 0:
assert r["error"] == param["assert"]
# elif r["error"] == 1:
......
......@@ -15,7 +15,7 @@ class TestDoctorSubmechanisms:
def test_DoctorSubmechanisms_data(self,param):
r = web_request().doctor_submechanisms()
print("======",r)
print("=======",r)
if r["error"] == 0:
assert r["error"] == param["assert"]
# elif r["error"] == 1:
......
service_list:
#有数据返回
#我的商品菜单下有数据返回1
-
case: "数据"
page: "1"
pagesize: "10"
is_online: "-1"
assert: 1
-
case: "我的商品-上线tab"
page: "1"
pagesize: "10"
is_online: "-1"
extra_filter_choice: "-1"
assert: 1
-
case: "我的商品-下线tab"
page: "1"
pagesize: "10"
is_online: "0"
extra_filter_choice: "-1"
assert: 1
-
case: "我的商品-待升级(全部tab)"
page: "1"
pagesize: "10"
is_online: "-1"
extra_filter_choice: "0"
assert: 1
-
case: "我的商品-待修改类目(全部tab)有数据返回"
page: "1"
pagesize: "10"
is_online: "-1"
extra_filter_choice: "1"
assert: 1
service_review_list:
#有数据返回
-
case: "商品审核-新商品审核 "
page: "1"
pagesize: "10"
type: "0"
assert: 1
-
case: "商品审核-商品修改审核"
page: "1"
pagesize: "10"
type: "1"
assert: 1
-
case: "商品审核-新商品审核"
page: "1"
pagesize: "10"
type: "2"
assert: 1
......@@ -17,7 +17,7 @@ servicereview_option:
-
case: "商品修改审核-撤回审核"
case: "商品修改审核-撤回审核 "
id: "209866"
type: "1"
csrfmiddlewaretoken: "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
......
tag_all:
-
case: "发布商品-选择类目跳转发布商品页面tag接口"
case: "发布商品-选择类目跳转发布商品页面tag接口 "
assert: 0
\ No newline at end of file
account_unreadbadgecount:
-
case: "发布商品-选择类目跳转发布商品页面account接口"
case: "发布商品-选择类目跳转发布商品页面account接口 "
assert: 0
\ No newline at end of file
article_videotoken:
-
case: "发布商品-选择类目跳转发布商品页面article接口"
case: "发布商品-选择类目跳转发布商品页面article接口 "
assert: 0
\ No newline at end of file
doctor_submechanisms:
-
case: "发布商品-选择类目跳转发布商品页面doctor接口"
case: "发布商品-选择类目跳转发布商品页面doctor接口 "
assert: 0
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment