Commit 34ff40e0 authored by aha's avatar aha

Merge branch 'common_dev' into cuixin_dev

parents 5d49fe8f 719174ec
......@@ -19,11 +19,21 @@ class conversation_request(BaseRequest):
self.params["offset_msg_id"] = offset_msg_id
return self.api_send(self.messageread["detail_messageid"])
#直播间私信主播
def detail_live(self, referrer_id):
# self.params["referrer"] = referrer
self.params["referrer_id"] = referrer_id
# self.params["last_msg_id"] = last_msg_id
# self.params["offset_msg_id"] = offset_msg_id
return self.api_send(self.messageread["detail_live"])
if __name__ == '__main__':
print(conversation_request().message_read("beijing", 1,'[10622,10626,10646,10651]'))
print("---------")
print(conversation_request().detail_messageid(10, 0, 0))
print(conversation_request().detail_live(737))
......
......@@ -22,3 +22,16 @@ detail_messageid:
json: {}
isLogin: 1 #需要登录的接口
#直播间私信主播
detail_live:
method: get
url: /api/conversation/detail/33909791_33910245
params:
referrer: ${referrer}
# referrer_id: ${referrer_id}
# last_msg_id: ${last_msg_id}
# offset_msg_id: ${offset_msg_id}
data: {}
json: {}
isLogin: 1
......@@ -78,6 +78,10 @@ class web2_request(BaseRequest):
self.params["category_id"] = category_id
return self.api_send(self.SERVICE_URL["artemis_cpc_category_service_ids"])
def cpc_doctor_promote_flows(self, month):
"点点通机构-历史每月推广明细"
self.params["month"] = month
return self.api_send(self.SERVICE_URL["cpc_doctor_promote_flows"])
if __name__ == '__main__':
print(web2_request().service_list("1", "10", "-1", "-1"))
......@@ -92,4 +96,5 @@ if __name__ == '__main__':
print(web2_request().artemis_cpc_categorypromotemanage_list(-1,-1))
print(web2_request().artemis_cpc_category_query("wangyang", 0))
print(web2_request().artemis_cpc_category_service_ids(1, 10, -1, 8))
print(web2_request().cpc_doctor_promote_flows("2021-7"))
......@@ -121,4 +121,13 @@ artemis_cpc_category_service_ids:
category_id: ${category_id}
data: {}
json: {}
isLogin: 1 #需要登录
cpc_doctor_promote_flows:
method: get
url: /api/web2/cpc_doctor/promote/flows
params:
month: ${month}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -63,37 +63,53 @@ class web_request(BaseRequest):
# return self.api_send(self.ACCOUNT_URL["file_upload"])
def cpc_homepage(self):
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, page):
self.params["status"] = status
self.params["page"] = page
return self.api_send(self.ACCOUNT_URL["artemis_order_list"])
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"])
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"])
def cpc_community_click_logs(self,page):
"点点通-内容-推广明细"
self.params["page"] = page
return self.api_send(self.ACCOUNT_URL["cpc_community_click_logs"])
def cpc_promote_flows(self, month):
"点点通商品-历史每月推广明细"
self.params["month"] = month
return self.api_send(self.ACCOUNT_URL["cpc_promote_flows"])
def cpc_promote_flows_excel(self, month):
"点点通商品-历史每月推广明细-导出"
self.params["month"] = month
return self.api_send(self.ACCOUNT_URL["cpc_promote_flows_excel"])
def cpc_community_promote_flows(self, month):
"点点通内容-历史每月推广明细"
self.params["month"] = month
return self.api_send(self.ACCOUNT_URL["cpc_community_promote_flows"])
if __name__ == '__main__':
......@@ -118,4 +134,7 @@ if __name__ == '__main__':
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"))
print(web_request().cpc_community_click_logs(1))
\ No newline at end of file
print(web_request().cpc_community_click_logs(1))
print(web_request().cpc_promote_flows("2021-7"))
print(web_request().cpc_promote_flows_excel("2021-7"))
print(web_request().cpc_community_promote_flows("2021-7"))
\ No newline at end of file
......@@ -190,3 +190,30 @@ cpc_community_click_logs:
data: {}
json: {}
isLogin: 1 #需要登录
cpc_promote_flows:
method: get
url: /api/web/cpc/promote/flows
params:
month: ${month}
data: {}
json: {}
isLogin: 1 #需要登录
cpc_promote_flows_excel:
method: get
url: /api/web/cpc/promote/flows/excel
params:
month: ${month}
data: {}
json: {}
isLogin: 1 #需要登录
cpc_community_promote_flows:
method: get
url: /api/web/cpc_community/promote/flows
params:
month: ${month}
data: {}
json: {}
isLogin: 1 #需要登录
......@@ -4,7 +4,7 @@ from in_common.base_request import BaseRequest
class achelous_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.ACHELOUS_REQUEST_CONFIG)
#直播间批量添加商品
def batch_add_service(self, stream_id, service_item_ids):
self.params["stream_id"] = stream_id
self.params["service_item_ids"] = service_item_ids
......
#批量添加直播间商品
batch_add_service:
method: post
url: /achelous/live/batch_add_service
......
......@@ -305,6 +305,8 @@ DETAIL_MESSAGEID = os.path.join(BASE_DIR, "backend_auto/test_backend_data/conver
#消息
MESSAGE_READ_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "conversation_request.yaml")
MESSAGE_READ = os.path.join(BASE_DIR, "backend_auto/test_backend_data/conversation_data", "message_read.yaml")
#直播私信主播
DETAIL_LIVE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/conversation_data", "detail_live.yaml")
#消息页未读数
UNREAD_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "notification_request.yaml")
......@@ -485,6 +487,14 @@ CPCCATEGORYPROMOTEMANAGELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_da
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")
#医生后台-点点通商品-历史每月推广数据
CPCPROMOTEFLOWS=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_promote_flows.yaml")
#医生后台-点点通商品-历史每月推广数据-导出
CPCPROMOTEFLOWSEXCEL=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_promote_flows_excel.yaml")
#医生后台-点点通内容-历史每月推广数据
CPCCOMMUNITYPROMOTEFLOWS=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_community_promote_flows.yaml")
#医生后台-点点通机构-历史每月推广数据
CPCDOCTORPROMOTEFLOWS=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "cpc_doctor_promote_flows.yaml")
......
import pytest
import path_setting
from ids_list import get_ids
from in_common.base_request import BaseRequest
from all_backend_api.conversation_request import conversation_request
class TestDetailLive:
data = BaseRequest().api_load(path_setting.DETAIL_LIVE)
detail_live_case, detail_live_data = get_ids(data, "detail_live")
@pytest.mark.parametrize("param",detail_live_data,ids=detail_live_case)
def test_detail_live(self,param):
r = conversation_request().detail_live(param["referrer_id"])
if r["error"] == 0:
assert r["error"] == param["assert"]
\ No newline at end of file
detail_live:
-
case: "直播私信主播"
referrer_id: 737
assert: 0
\ No newline at end of file
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 TestCpcDoctorPromoteFlows:
data = BaseRequest().api_load(path_setting.CPCDOCTORPROMOTEFLOWS)
cpcdoctorpromoteflows_case, cpcdoctorpromoteflows_data = get_ids(data, "cpc_doctor_promote_flows")
@pytest.mark.parametrize("param",cpcdoctorpromoteflows_data,ids=cpcdoctorpromoteflows_case)
def test_cpc_doctor_promote_flows(self, param):
'''点点通商品-历史每月推广明细-导出'''
r = web2_request().cpc_doctor_promote_flows(param["month"])
if r["error"] == 0:
flows_list = r.get("data").get("flows_list", [])
assert len(flows_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 TestCpcCommunityPromoteFlows:
data = BaseRequest().api_load(path_setting.CPCCOMMUNITYPROMOTEFLOWS)
cpccommunitypromoteflows_case, cpccommunitypromoteflows_data = get_ids(data, "cpc_community_promote_flows")
@pytest.mark.parametrize("param",cpccommunitypromoteflows_data,ids=cpccommunitypromoteflows_case)
def test_cpc_community_promote_flows(self, param):
'''点点通商品-历史每月推广明细-导出'''
r = web_request().cpc_community_promote_flows(param["month"])
if r["error"] == 0:
flows_list = r.get("data").get("flows_list", [])
assert len(flows_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 TestCpcPromoteFlows:
data = BaseRequest().api_load(path_setting.CPCPROMOTEFLOWS)
cpcpromoteflows_case, cpcpromoteflows_data = get_ids(data, "cpc_promote_flows")
@pytest.mark.parametrize("param",cpcpromoteflows_data,ids=cpcpromoteflows_case)
def test_cpc_promote_flows(self, param):
'''点点通商品-历史每月推广明细'''
r = web_request().cpc_promote_flows(param["month"])
if r["error"] == 0:
flows_list = r.get("data").get("flows_list", [])
assert len(flows_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 TestCpcPromoteFlows:
data = BaseRequest().api_load(path_setting.CPCPROMOTEFLOWSEXCEL)
cpcpromoteflowsexcel_case, cpcpromoteflowsexcel_data = get_ids(data, "cpc_promote_flows_excel")
@pytest.mark.parametrize("param",cpcpromoteflowsexcel_data,ids=cpcpromoteflowsexcel_case)
def test_cpc_promote_flows_excel(self, param):
'''点点通商品-历史每月推广明细-导出'''
r = web_request().cpc_promote_flows_excel(param["month"])
assert r["error"] == 0
cpc_doctor_promote_flows:
#点点通机构-历史每月推广数据
-
case: "点点通机构-历史每月推广数据-21年7月"
month: "2021-7"
assert: 0
-
case: "点点通机构-历史每月推广数据-20年7月"
month: "2020-7"
assert: 0
-
case: "点点通机构-历史每月推广数据-25年7月"
month: "2025-7"
assert: 0
\ No newline at end of file
cpc_community_promote_flows:
#点点通内容-历史每月推广数据
-
case: "点点通内容-历史每月推广数据-21年7月"
month: "2021-7"
assert: 0
-
case: "点点通内容-历史每月推广数据-20年7月"
month: "2020-7"
assert: 0
-
case: "点点通内容-历史每月推广数据-25年7月"
month: "2025-7"
assert: 0
\ No newline at end of file
cpc_promote_flows:
#点点通商品-历史每月推广数据
-
case: "点点通商品-历史每月推广数据-21年7月"
month: "2021-7"
assert: 0
-
case: "点点通商品-历史每月推广数据-20年7月"
month: "2020-7"
assert: 0
-
case: "点点通商品-历史每月推广数据-25年7月"
month: "2025-7"
assert: 0
\ No newline at end of file
cpc_promote_flows_excel:
#点点通商品-历史每月推广数据-导出
-
case: "点点通商品-历史每月推广数据-导出-21年7月"
month: "2021-7"
assert: 0
-
case: "点点通商品-历史每月推广数据-导出-20年7月"
month: "2020-7"
assert: 0
-
case: "点点通商品-历史每月推广数据-导出-25年7月"
month: "2025-7"
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