Commit a4093a0a authored by 张淑琴's avatar 张淑琴

我的服务订单

parent 9d792a68
......@@ -65,6 +65,9 @@ class web_request(BaseRequest):
return self.api_send(self.ACCOUNT_URL["cpc_homepage"])
def artemis_ad_type_list(self):
return self.api_send(self.ACCOUNT_URL["artemis_ad_type_list"])
def artemis_order_list(self,status):
self.params["status"] = status
return self.api_send(self.ACCOUNT_URL["artemis_order_list"])
......@@ -84,4 +87,8 @@ if __name__ == '__main__':
# print(web_request().file_upload("19","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g","WU_FILE_0","lADPDg7mQdiUTiLNAZDNAZA_400_400.jpg_720x720g.jpg","image/jpeg","Mon Apr 26 2021 11:29:45 GMT+0800 (中国标准时间)","17688","(binary)"))
print(web_request().conversation_user_id(0, "您好", 602329, "271caac2ae1687ca0a56ee18115b8183", "NLeTxEx1BOQo1zjv2us9BQ00ViMAHGpJ"))
print(web_request().cpc_homepage())
print(web_request().artemis_ad_type_list())
\ No newline at end of file
print(web_request().artemis_ad_type_list())
print("发送")
print(web_request().artemis_order_list(0))
print(web_request().artemis_order_list(1))
print(web_request().artemis_order_list(2))
\ No newline at end of file
......@@ -135,4 +135,13 @@ artemis_ad_type_list:
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
artemis_order_list:
method: get
url: /api/web/artemis/order/list
params:
status: ${status}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -390,6 +390,8 @@ CONVERSATIONUSERID=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_dat
ADTYPELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "artemis_ad_type_list.yaml")
#医生后台-我的购物车
ADADDSHOPPINGCARTINFO=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_ad_add_shopping_cart_info.yaml")
#医生后台-我的服务订单
ORDERLIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "artemis_order_list.yaml")
#医生后台-点点通商品-概览
CPCHOMEPAGE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_homepage.yaml")
......
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request
class TestArtemisOrderList:
data = BaseRequest().api_load(path_setting.ORDERLIST)
orderlist_case, orderlist_data = get_ids(data, "artemis_order_list")
@pytest.mark.parametrize("param",orderlist_data,ids=orderlist_case)
def test_artemis_order_list(self, param):
'''我的服务订单'''
r = web_request().artemis_order_list(param["status"])
if r["error"] == 0:
orders = r.get("data").get("orders", [])
assert len(orders) >= param["assert"]
artemis_order_list:
#我的服务订单case
-
case: "我的服务订单请求失败case"
status: ""
assert: 0
-
case: "我的服务订单-待支付广告包case"
status: 0
assert: 0
-
case: "我的服务订单-已购买case"
status: 1
assert: 0
-
case: "我的服务订单-待审核case"
status: 2
assert: 0
-
case: "我的服务订单-待上线case"
status: 3
assert: 0
-
case: "我的服务订单-上线中case"
status: 4
assert: 0
-
case: "我的服务订单-已下线case"
status: 5
assert: 0
-
case: "我的服务订单-已支付广告包case"
status: 6
assert: 0
-
case: "我的服务订单-已关闭广告包case"
status: 7
assert: 0
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