Commit 15261c6c authored by 张淑琴's avatar 张淑琴

关联美购

parent dca5c4e8
...@@ -48,13 +48,16 @@ class web2_request(BaseRequest): ...@@ -48,13 +48,16 @@ class web2_request(BaseRequest):
def artemis_ad_add_shopping_cart_info(self): def artemis_ad_add_shopping_cart_info(self):
#我的购物车 #我的购物车
return self.api_send(self.SERVICE_URL["artemis_ad_add_shopping_cart_info"]) return self.api_send(self.SERVICE_URL["artemis_ad_add_shopping_cart_info"])
def artemis_add_value_order_id_detail(self): def artemis_add_value_order_id_detail(self):
"我的服务订单-已购买" "我的服务订单-已购买"
return self.api_send(self.SERVICE_URL["artemis_add_value_order_id_detail"]) return self.api_send(self.SERVICE_URL["artemis_add_value_order_id_detail"])
def artemis_ad_packageorder_detail(self, package_order_id): def artemis_ad_packageorder_detail(self, package_order_id):
"我的服务订单-已支付广告包" "我的服务订单-已支付广告包"
self.params["package_order_id"] = package_order_id self.params["package_order_id"] = package_order_id
return self.api_send(self.SERVICE_URL["artemis_ad_packageorder_detail"]) return self.api_send(self.SERVICE_URL["artemis_ad_packageorder_detail"])
def artemis_cpc_categorypromotemanage_list(self, promote_flag,id): def artemis_cpc_categorypromotemanage_list(self, promote_flag,id):
"点点通商品-品类推广管理" "点点通商品-品类推广管理"
self.params["promote_flag"] = promote_flag self.params["promote_flag"] = promote_flag
...@@ -67,6 +70,14 @@ class web2_request(BaseRequest): ...@@ -67,6 +70,14 @@ class web2_request(BaseRequest):
self.params["flag_relation"] = flag_relation self.params["flag_relation"] = flag_relation
return self.api_send(self.SERVICE_URL["artemis_cpc_category_query"]) return self.api_send(self.SERVICE_URL["artemis_cpc_category_query"])
def artemis_cpc_category_service_ids(self, page, pagesize, is_online, category_id):
"品类推广管理-新增推广品类-关联美购"
self.params["page"] = page
self.params["pagesize"] = pagesize
self.params["is_online"] = is_online
self.params["category_id"] = category_id
return self.api_send(self.SERVICE_URL["artemis_cpc_category_service_ids"])
if __name__ == '__main__': if __name__ == '__main__':
print(web2_request().service_list("1", "10", "-1", "-1")) print(web2_request().service_list("1", "10", "-1", "-1"))
...@@ -80,4 +91,5 @@ if __name__ == '__main__': ...@@ -80,4 +91,5 @@ if __name__ == '__main__':
print(web2_request().artemis_ad_packageorder_detail("685529883901")) print(web2_request().artemis_ad_packageorder_detail("685529883901"))
print(web2_request().artemis_cpc_categorypromotemanage_list(-1,-1)) print(web2_request().artemis_cpc_categorypromotemanage_list(-1,-1))
print(web2_request().artemis_cpc_category_query("wangyang", 0)) print(web2_request().artemis_cpc_category_query("wangyang", 0))
print(web2_request().artemis_cpc_category_service_ids(1, 10, -1, 8))
...@@ -110,3 +110,15 @@ artemis_cpc_category_query: ...@@ -110,3 +110,15 @@ artemis_cpc_category_query:
data: {} data: {}
json: {} json: {}
isLogin: 1 #需要登录 isLogin: 1 #需要登录
artemis_cpc_category_service_ids:
method: get
url: /api/web2/artemis/cpc/category/service_ids
params:
page: ${page}
pagesize: ${pagesize}
is_online: ${is_online}
category_id: ${category_id}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
...@@ -472,6 +472,8 @@ CPCCOMMUNITYCLICKLOGS=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_ ...@@ -472,6 +472,8 @@ CPCCOMMUNITYCLICKLOGS=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_
CPCCATEGORYPROMOTEMANAGELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_cpc_categorypromotemanage_list.yaml") CPCCATEGORYPROMOTEMANAGELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_cpc_categorypromotemanage_list.yaml")
#医生后台-点点通商品-品类推广管理-新增推广品类 #医生后台-点点通商品-品类推广管理-新增推广品类
CPCCATEGORYQUERY=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_cpc_category_query.yaml") CPCCATEGORYQUERY=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_cpc_category_query.yaml")
#医生后台-点点通商品-品类推广管理-新增推广品类-关联美购
CPCCATEGORYSERVICEIDS=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_cpc_category_service_ids.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 TestArtemisCpcCategoryServiceIds:
data = BaseRequest().api_load(path_setting.CPCCATEGORYSERVICEIDS)
cpccategoryserviceids_case, cpccategoryserviceids_data = get_ids(data, "artemis_cpc_category_service_ids")
@pytest.mark.parametrize("param",cpccategoryserviceids_data,ids=cpccategoryserviceids_case)
def test_artemis_cpc_category_service_ids(self, param):
'''点点通商品-品类推广管理-新增品类推广-关联美购'''
r = web2_request().artemis_cpc_category_service_ids(param["page"], param["pagesize"], param["is_online"], param["category_id"])
print(r)
if r["error"] == 0:
assert r["data"]["services"][0]["is_online"] == param["assert"]
artemis_cpc_category_service_ids:
#点点通商品-品类推广管理
-
case: "点点通商品-品类推广-关联美购-美购状态为已下线"
page: 1
pagesize: 10
is_online: -1
category_id: 8
assert: False
-
case: "点点通商品-品类推广-关联美购-美购状态为已上线"
page: 1
pagesize: 10
is_online: -1
category_id: 22
assert: True
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