Commit 9d792a68 authored by 张淑琴's avatar 张淑琴

我的购物车

parent 7d0c978c
...@@ -45,6 +45,10 @@ class web2_request(BaseRequest): ...@@ -45,6 +45,10 @@ class web2_request(BaseRequest):
self.params["page"] = page self.params["page"] = page
return self.api_send(self.SERVICE_URL["service_deletelist"]) return self.api_send(self.SERVICE_URL["service_deletelist"])
def artemis_ad_add_shopping_cart_info(self):
#我的购物车
return self.api_send(self.SERVICE_URL["artemis_ad_add_shopping_cart_info"])
...@@ -55,4 +59,5 @@ if __name__ == '__main__': ...@@ -55,4 +59,5 @@ if __name__ == '__main__':
print(web2_request().tag_all()) print(web2_request().tag_all())
print(web2_request().service_delete("1","209863","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g")) print(web2_request().service_delete("1","209863","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web2_request().service_deletelist("1"))#商品回收站 print(web2_request().service_deletelist("1"))#商品回收站
print(web2_request().artemis_ad_add_shopping_cart_info())
...@@ -66,3 +66,11 @@ service_deletelist: ...@@ -66,3 +66,11 @@ service_deletelist:
data: {} data: {}
json: {} json: {}
isLogin: 1 isLogin: 1
artemis_ad_add_shopping_cart_info:
method: get
url: /api/web2/artemis/ad/add_shopping_cart/info
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
...@@ -388,6 +388,8 @@ CONVERSATIONUSERID=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_dat ...@@ -388,6 +388,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") 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")
#医生后台-点点通商品-概览 #医生后台-点点通商品-概览
CPCHOMEPAGE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_homepage.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.web2_request import web2_request
class TestArtemisAdAddShoppingCartInfo:
data = BaseRequest().api_load(path_setting.ADADDSHOPPINGCARTINFO)
adaddshoppingcartinfo_case, adaddshoppingcartinfo_data = get_ids(data, "artemis_ad_add_shopping_cart_info")
@pytest.mark.parametrize("param",adaddshoppingcartinfo_data,ids=adaddshoppingcartinfo_case)
def test_artemis_ad_add_shopping_cart_info(self, param):
'''我的购物车列表'''
r = web2_request().artemis_ad_add_shopping_cart_info()
if r["error"] == 0:
data = r.get("data").get("data", [])
assert len(data) >= param["assert"]
artemis_ad_add_shopping_cart_info:
#我的购物车case
-
case: "我的购物车"
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