Commit 4d51f523 authored by 张淑琴's avatar 张淑琴

数据统计内容

parent 4c57bb48
......@@ -75,6 +75,18 @@ class web_request(BaseRequest):
def cpc_community_homepage(self):
"点点通-内容-概览"
return self.api_send(self.ACCOUNT_URL["cpc_community_homepage"])
def cpc_community_diaries(self):
"点点通-内容-数据统计-内容"
return self.api_send(self.ACCOUNT_URL["cpc_community_diaries"])
def cpc_community_data_info(self,diary_id,start_time,end_time):
"点点通-内容-数据统计"
self.params["diary_id"] = diary_id
self.params["start_time"] = start_time
self.params["end_time"] = end_time
return self.api_send(self.ACCOUNT_URL["cpc_community_data_info"])
......@@ -95,9 +107,10 @@ if __name__ == '__main__':
print(web_request().conversation_user_id(0, "您好", 602329, "271caac2ae1687ca0a56ee18115b8183", "NLeTxEx1BOQo1zjv2us9BQ00ViMAHGpJ"))
print(web_request().cpc_homepage())
print(web_request().artemis_ad_type_list())
print("发送")
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())
print(web_request().cpc_community_homepage())
\ No newline at end of file
print(web_request().cpc_community_homepage())
print(web_request().cpc_community_diaries())
print(web_request().cpc_community_data_info("15604767","2021-07-02","2021-07-12"))
\ No newline at end of file
......@@ -161,4 +161,23 @@ cpc_community_homepage:
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
cpc_community_diaries:
method: get
url: /api/web/cpc_community/diaries
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
cpc_community_data_info:
method: get
url: /api/web/cpc_community/data/info
params:
diary_id: ${diary_id}
start_time: ${start_time}
end_time: ${end_time}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -437,6 +437,11 @@ ADPACKAGEORDERDETAIL=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_
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")
#医生后台-点点通内容-数据统计-内容
CPCCOMMUNITYDIARIES=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_community_diaries.yaml")
#医生后台-点点通内容-数据统计
CPCCOMMUNITYDATAINFO=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_community_data_info.yaml")
#更美次卡橱窗组件商品
VISUAL_BEAUTY_CARD_SERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "visual_beauty_card.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 TestCpcCommunityDataInfo:
data = BaseRequest().api_load(path_setting.CPCCOMMUNITYDATAINFO)
cpccommunitydatainfo_case, cpccommunitydatainfo_data = get_ids(data, "cpc_community_data_info")
@pytest.mark.parametrize("param",cpccommunitydatainfo_data,ids=cpccommunitydatainfo_case)
def test_cpc_community_data_info(self, param):
'''点点通内容-数据统计'''
r = web_request().cpc_community_data_info(param["diary_id"], param["start_time"], param["end_time"])
if r["error"] == 0:
click_list = r.get("data").get("click_list", [])
paid_list = r.get("data").get("paid_list", [])
time_list = r.get("data").get("time_list", [])
assert len(click_list) <= param["assert"]
assert len(paid_list) <= param["assert"]
assert len(time_list) <= param["assert"]
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 TestCpcCommunityDiaries:
data = BaseRequest().api_load(path_setting.CPCCOMMUNITYDIARIES)
cpccommunitydiaries_case, cpccommunitydiaries_data = get_ids(data, "cpc_community_diaries")
@pytest.mark.parametrize("param",cpccommunitydiaries_data,ids=cpccommunitydiaries_case)
def test_cpc_community_diaries(self, param):
'''点点通-概览'''
r = web_request().cpc_community_diaries()
if r["error"] == 0:
diaries = r.get("data").get("diaries", [])
assert len(diaries) >= param["assert"]
cpc_community_data_info:
#点点通内容-数据统计case
-
case: "点点通内容-数据统计"
diary_id: 15604767
start_time: "2021-07-02"
end_time: "2021-07-12"
assert: 13
cpc_community_diaries:
#点点通内容-数据统计-内容case
-
case: "点点通内容-数据统计-内容"
#doctor_user_id: "602329"
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