Commit 79afc43c authored by 张淑琴's avatar 张淑琴

点点通内容概览

parent 6e024e68
......@@ -72,6 +72,9 @@ class web_request(BaseRequest):
def artemis_order_id_detail(self):
"上线中订单详情页"
return self.api_send(self.ACCOUNT_URL["artemis_order_id_detail"])
def cpc_community_homepage(self):
"点点通-内容-概览"
return self.api_send(self.ACCOUNT_URL["cpc_community_homepage"])
......@@ -96,4 +99,5 @@ if __name__ == '__main__':
print(web_request().artemis_order_list(0, 1))
print(web_request().artemis_order_list(1, 1))
print(web_request().artemis_order_list(2, 1))
print(web_request().artemis_order_id_detail())
\ No newline at end of file
print(web_request().artemis_order_id_detail())
print(web_request().cpc_community_homepage())
\ No newline at end of file
......@@ -153,4 +153,12 @@ artemis_order_id_detail:
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
cpc_community_homepage:
method: get
url: /api/web/cpc_community/homepage
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -435,6 +435,8 @@ VALUEORDERIDDETAIL=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_da
ADPACKAGEORDERDETAIL=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_ad_packageorder_detail.yaml")
#医生后台-点点通商品-概览
CPCHOMEPAGE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_homepage.yaml")
#医生后台-点点通内容-概览
CPCCOMMUNITYHOMEPAGE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_community_homepage.yaml")
#更美次卡橱窗组件商品
VISUAL_BEAUTY_CARD_SERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "visual_beauty_card.yaml")
......
......@@ -18,4 +18,6 @@ class TestArtemisOrderList:
if r["error"] == 0:
orders = r.get("data").get("orders", [])
assert len(orders) >= param["assert"]
if r["error"] == 300002:
assert r["message"] == param["assert_message"]
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 TestCpcCommunityHomepage:
data = BaseRequest().api_load(path_setting.CPCCOMMUNITYHOMEPAGE)
cpccommunityhomepage_case, cpccommunityhomepage_data = get_ids(data, "cpc_community_homepage")
@pytest.mark.parametrize("param",cpccommunityhomepage_data,ids=cpccommunityhomepage_case)
def test_cpc_community_homepage(self, param):
'''点点通-概览'''
r = web_request().cpc_community_homepage()
if r["error"] == 0:
if r["data"]["account"] <= "0":
assert r["data"]["is_cpc"] == param["assert"]
else:
assert r["data"]["is_cpc"] == param["assert1"]
artemis_order_list:
#我的服务订单case
-
case: "我的服务订单请求失败case"
case: "我的服务订单参数错误case"
status: ""
page: 1
assert: 0
assert_message: "错误参数: status"
-
case: "我的服务订单-待支付广告包case"
status: 0
......
cpc_community_homepage:
#点点通内容-概览case
-
case: "点点通内容概览"
#doctor_user_id: "602329"
assert: False
assert_account: 0
assert1: True
\ 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