Commit 2e68d056 authored by 张伟男's avatar 张伟男

Merge branch 'common_dev' into zwn_dev

parents 1c69f702 789f4d52
......@@ -14,8 +14,18 @@ class account_request(BaseRequest):
self.params["face_token"] = face_token
return self.api_send(self.loginvfc["login_vfc"])
# 我的-头像点击
def account_homepage(self, user_id, device_id):
self.params["user_id"] = user_id
self.params["device_id"] = device_id
return self.api_send(self.loginvfc["account_homepage"])
if __name__ == '__main__':
# print(account_request().user_info())
print(account_request.loginvfc(""))
\ No newline at end of file
print(account_request.loginvfc(""))
print(account_request().account_homepage("33910245", "androidid_16a95f3fa31a4c0b"))
\ No newline at end of file
......@@ -12,3 +12,12 @@ login_vfc:
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
account_homepage:
method: get
url: /api/account/homepage
params:
user_id: ${user_id}
device_id: ${device_id}
data:
json: {}
isLogin: 1
\ No newline at end of file
......@@ -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
......@@ -47,4 +47,12 @@ class diary_request(BaseRequest):
self.params["topic_list"] = topic_list
return self.api_send(self.data["update"])
# 日记本卡片点赞
def diary_vote(self, diary_id):
self.params["diary_id"] = diary_id
return self.api_send(self.data["vote"])
# 日记本卡片取消点赞
def diary_cancel_vote(self, diary_id):
self.params["diary_id"] = diary_id
return self.api_send(self.data["cancel_vote"])
......@@ -78,3 +78,25 @@ update:
topic_list: ${topic_list}
json: {}
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#日记本卡片的点赞
vote:
method: post
url: /api/diary/vote
params:
data:
diary_id: ${diary_id}
json: {}
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#日记本卡片的取消点赞
cancel_vote:
method: post
url: /api/diary/cancel_vote
params:
data:
diary_id: ${diary_id}
json: {}
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
......@@ -8,6 +8,10 @@ class live_request(BaseRequest):
self.data = self.api_load(path_setting.LIVEGIFTS_CONFIG)
self.data = self.api_load(path_setting.SEARCHSERVICE_CONFIG)
self.data = self.api_load(path_setting.ADDLIVESERVICE_CONFIG)
self.data = self.api_load(path_setting.ADDLIVEGIFT_CONFIG)
self.data = self.api_load(path_setting.POP_SERVICE_CONFIG)
self.data = self.api_load(path_setting.POP_GIFT_CONFIG)
self.data = self.api_load(path_setting.GET_GIFT_CONFIG)
self.data = self.api_load(path_setting.DELETELIVESERVICE_CONFIG)
self.data = self.api_load(path_setting.DELETEGIFT_CONFIG)
self.data = self.api_load(path_setting.M_GET_CHANNEL_STATUS_CONFIG)
......@@ -59,6 +63,36 @@ class live_request(BaseRequest):
self.params["version"] = version
return self.api_send(self.data["add_live_service"])
#主播-添加商品后,购物车上方弹出商品卡片
def pop_service(self, stream_id, live_service_id, pop_type, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["stream_id"] = stream_id
self.params["live_service_id"] = live_service_id
self.params["pop_type"] = pop_type
self.params["version"] = version
return self.api_send(self.data["pop_service"])
#主播-推荐袋添加尾款券(主播账号为机构或医生)
def add_live_gift(self, channel_id, doctor_gift_ids, platform_gift_ids, stream_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
self.params["doctor_gift_ids"] = doctor_gift_ids
self.params["platform_gift_ids"] = platform_gift_ids
self.params["stream_id"] = stream_id
self.params["version"] = version
return self.api_send(self.data["add_live_gift"])
#om后台-弹出美券
def pop_gift(self, stream_id, gift_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["stream_id"] = stream_id
self.params["gift_id"] = gift_id
self.params["version"] = version
return self.api_send(self.data["pop_gift"])
#用户-领取美券
def get_gift(self, gift_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["gift_id"] = gift_id
self.params["version"] = version
return self.api_send(self.data["get_gift"])
#主播-推荐袋删除商品
def delete_live_service(self, channel_id, live_service_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
......@@ -107,6 +141,11 @@ if __name__ == '__main__':
# print(live_request().search_service("beijing", "745", "", "0", "20", "7.45.0"))
# print(live_request().add_live_service("745", "560641", "7.45.0"))
# print(live_request().delete_live_service("745", "7242", "7.45.0"))
#print(live_request().m_get_channel_status("745", "7.46.0"))
print(live_request().mark_live_service("4233", "745", "7269", "1", "746.0"))
print(live_request().audience_services("4179","739","0","20"))
\ No newline at end of file
# print(live_request().m_get_channel_status("745", "7.46.0"))
# print(live_request().mark_live_service("4233", "745", "7269", "1", "746.0"))
# print(live_request().audience_services("4179","739","0","20"))
# print(live_request().pop_service("4266", "7324", "1", "746.0"))
print(live_request().add_live_gift("739", "59127", "", "4283", "7.45.0"))
print(live_request().delete_live_gift("739", "59127", "1", "4283", "7.45.0"))
# print(live_request().pop_gift("4271", "59124", "746.0"))
# print(live_request().get_gift( "59124", "746.0"))
\ No newline at end of file
......@@ -52,6 +52,56 @@ add_live_service:
json: {}
isLogin: 1
#主播-添加商品后,购物车上方弹出商品卡片
pop_service:
method: GET
url: /api/janus/live/pop_service
params:
stream_id: ${stream_id}
live_service_id: ${live_service_id}
pop_type: ${pop_type}
version: ${version}
data: {}
json: {}
isLogin: 1
#主播-推荐袋添加尾款券(主播账号为机构或医生)
add_live_gift:
method: POST
url: /api/janus/live/add_live_gift
params:
version: ${version}
data:
channel_id: ${channel_id}
doctor_gift_ids: ${doctor_gift_ids}
platform_gift_ids: ${platform_gift_ids}
stream_id: ${stream_id}
json: {}
isLogin: 1
#om后台-弹出美券
pop_gift:
method: GET
url: /api/janus/live/pop_gift
params:
stream_id: ${stream_id}
gift_id: ${gift_id}
version: ${version}
data: {}
json: {}
isLogin: 1
#用户-领取美券
get_gift:
method: POST
url: /api/janus/live/get_gift
params:
version: ${version}
data:
gift_id: ${gift_id}
json: {}
isLogin: 1
#主播-推荐袋删除商品
delete_live_service:
method: POST
......
......@@ -248,6 +248,19 @@ class janus_request(BaseRequest):
self.params["rosy"] = rosy
return self.api_send(self.data["beauty_post"])
# 日记点击大图--关联美购--除了id外其余用默认参数代替
def sales_lead_spu_by_diary(self, diary_id, current_city_id='beijing',
device_id='91B499C2-1CA2-4CB2-F118-658C87BC1795',
lat='39.98318403526738', lng='116.4880823948151'):
self.params["diary_id"] = diary_id
self.params["current_city_id"] = current_city_id
self.params["device_id"] = device_id
self.params["lat"] = lat
self.params["lng"] = lng
return self.api_send(self.data["sales_lead_spu_by_diary"])
#
if __name__ == '__main__':
......
......@@ -340,4 +340,19 @@ beauty_post:
white: ${white}
rosy: ${rosy}
json: {}
isLogin: 1
\ No newline at end of file
isLogin: 1
#日记点击大图--关联美购--除了id外其余用默认参数代替
sales_lead_spu_by_diary:
method: get
url: /api/janus/sales_lead/spu_by_diary
params:
diary_id: ${diary_id}
current_city_id: ${current_city_id}
device_id: ${device_id}
lat: ${lat}
lng: ${lng}
data: {}
json: {}
isLogin: 0
\ No newline at end of file
......@@ -46,6 +46,18 @@ class living_request(BaseRequest):
self.params["version"] = version
return self.api_send(self.data["finish"])
#直播回放-进入直播间
def replay_info(self,topic_id, version, device_id="97B6764B-2135-4761-9911-701C38CBC272"):
self.params["topic_id"] = topic_id
self.params["version"] = version
return self.api_send(self.data["replay_info"])
#直播回放-查看直播间弹幕
def replay_msg(self,topic_id, version, device_id="97B6764B-2135-4761-9911-701C38CBC272"):
self.params["topic_id"] = topic_id
self.params["version"] = version
return self.api_send(self.data["replay_msg"])
#主播-分享按钮的点击
def get_live_info_audience(self,channel_id, version, device_id="97B6764B-2135-4761-9911-701C38CBC272"):
self.params["channel_id"] = channel_id
......@@ -56,8 +68,10 @@ class living_request(BaseRequest):
if __name__ == '__main__':
(living_request().danmu_v2("739", "1"))
(living_request().pushlive_info("小冤家", "2021/04/22/1003/cef471cff5e6", "", "1", "1", "1"))
print (living_request().sendmsg("739","你好"))
print(living_request().finish("745", "746.0"))
print(living_request().get_live_info_audience("745", "7.46.0"))
\ No newline at end of file
# (living_request().danmu_v2("739", "1"))
# (living_request().pushlive_info("小冤家", "2021/04/22/1003/cef471cff5e6", "", "1", "1", "1"))
# print (living_request().sendmsg("739","你好"))
# print(living_request().finish("745", "746.0"))
# print(living_request().get_live_info_audience("745", "7.46.0"))
# print(living_request().replay_info("123456978", "746.0"))
print(living_request().replay_msg("123456978", "746.0"))
\ No newline at end of file
......@@ -69,6 +69,28 @@ finish:
json: {}
isLogin: 1
#直播回放-进入直播间
replay_info:
method: GET
url: /api/live/replay_info
params:
topic_id: ${topic_id}
version: ${version}
data: {}
json: {}
isLogin: 1
#直播回放-查看直播间弹幕
replay_msg:
method: GET
url: /api/live/replay_msg
params:
topic_id: ${topic_id}
version: ${version}
data: {}
json: {}
isLogin: 1
#主播-分享按钮的点击
get_live_info_audience:
method: GET
......
import path_setting
from in_common.base_request import BaseRequest
class query_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.QUERY_CONFIG)
# 详情页预置词
def preset_words(self, id,type ):
self.params["id"] = id
self.params["type"] = type
return self.api_send(self.data["preset_words"])
#详情页预置词
preset_words:
method: get
url: /api/query/preset_words
params:
id: ${id}
type: ${type}
data:
json: {}
isLogin: 0 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
......@@ -119,6 +119,21 @@ class user_request(BaseRequest):
return self.api_send(self.data["favors_topics"])
# 我的-收藏-帖子
def favors_tractate(self, page, count):
self.params["page"] = page
self.params["count"] = count
return self.api_send(self.data["favors_tractate"])
# 我的-收藏-回答
def favors_answers(self, page, count):
self.params["page"] = page
self.params["count"] = count
return self.api_send(self.data["favors_answers"])
......@@ -158,6 +173,12 @@ if __name__ == '__main__':
# 我的-收藏-日记贴
print(user_request().favors_topics(0, 10))
# 我的-收藏-帖子
print(user_request().favors_tractate(1, 10))
# 我的-收藏-帖子
print(user_request().favors_answers(1, 10))
......@@ -157,3 +157,25 @@ favors_topics:
isLogin: 1
# 我的-收藏-帖子
favors_tractate:
method: GET
url: /api/user/favors/tractate
params:
page: ${page}
count: ${count}
data: {}
json: {}
isLogin: 1
# 我的-收藏-回答
favors_answers:
method: GET
url: /api/user/favors/answers
params:
page: ${page}
count: ${count}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
......@@ -48,13 +48,16 @@ class web2_request(BaseRequest):
def artemis_ad_add_shopping_cart_info(self):
#我的购物车
return self.api_send(self.SERVICE_URL["artemis_ad_add_shopping_cart_info"])
def artemis_add_value_order_id_detail(self):
"我的服务订单-已购买"
return self.api_send(self.SERVICE_URL["artemis_add_value_order_id_detail"])
def artemis_ad_packageorder_detail(self, package_order_id):
"我的服务订单-已支付广告包"
self.params["package_order_id"] = package_order_id
return self.api_send(self.SERVICE_URL["artemis_ad_packageorder_detail"])
def artemis_cpc_categorypromotemanage_list(self, promote_flag,id):
"点点通商品-品类推广管理"
self.params["promote_flag"] = promote_flag
......@@ -67,6 +70,18 @@ class web2_request(BaseRequest):
self.params["flag_relation"] = flag_relation
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"])
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"))
......@@ -80,4 +95,6 @@ if __name__ == '__main__':
print(web2_request().artemis_ad_packageorder_detail("685529883901"))
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"))
......@@ -109,4 +109,25 @@ artemis_cpc_category_query:
flag_relation: ${flag_relation}
data: {}
json: {}
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 #需要登录
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 #需要登录
import path_setting
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
return self.api_send(self.data["batch_add_service"])
#def batch_del_service(self, stream_id, service_item_ids):
# self.params["stream_id"] = stream_id
# self.params["service_item_ids"] = service_item_ids
# return self.api_send(self.data["batch_add_service"])
if __name__ == "__main__":
print(achelous_request().batch_add_service("4176", "73809,23508,33823"))
# print(achelous_request().batch_del_service("4176","7312,7311"))
\ No newline at end of file
#批量添加直播间商品
batch_add_service:
method: post
url: /achelous/live/batch_add_service
params: {}
data:
stream_id: ${stream_id}
service_item_ids: ${service_item_ids}
json: {}
isLogin: 1
#batch_del_service:
# method: post
#url: /achelous/live/batch_del_service
#params: {}
#data:
# stream_id: ${stream_id}
#service_item_ids: ${service_item_ids}
#json: {}
#isLogin: 1
\ No newline at end of file
......@@ -22,6 +22,8 @@ DIARY_FAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/diary_data"
DIARY_OPERATION = os.path.join(BASE_DIR, "backend_auto/test_backend_data/diary_data", "diary_operation.yaml")
# 日记本创建日记贴信息-
DIARY_UPDATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/diary_data", "diary_update.yaml")
# 日记本点赞&取消点赞
DIARY_VOTE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/diary_data", "vote.yaml")
# 日记本创建添加医院-- auto_complete 总配置项
......@@ -31,6 +33,15 @@ AUTO_COMPLE_HOSPITAL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/au
AUTO_COMPLE_DOCTOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/auto_complete_data", "doctor.yaml")
# 详情页搜索预置词--query 总配置项
QUERY_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "query_request.yaml")
QUERY_PRESET_WORDS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/query_data", "preset_words.yaml")
# 日记大图召回美购
SPU_BY_DIARY = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "sales_lead_spu_by_diary.yaml")
# 日记本进入相册页
DIARY_ALBUM_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hybrid_diary_request.yaml")
DIARY_ALBUM = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hybrid_data", "diary_album.yaml")
......@@ -38,7 +49,7 @@ DIARY_ALBUM = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hybrid_data
# 日记本列表-日记贴点赞相关()
DIARY_VOTE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hybrid_api_topic_request.yaml")
DIARY_VOTE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hybrid_data", "api_topic_vote.yaml")
DIARY_TOPIC_VOTE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hybrid_data", "api_topic_vote.yaml")
# 日记本&帖子&日记贴&帖子&问答各个详情页下方推荐内容
......@@ -296,6 +307,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")
......@@ -474,6 +487,16 @@ 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")
#医生后台-点点通商品-品类推广管理-新增推广品类
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")
......@@ -546,6 +569,10 @@ CHECK_SKU_IDS = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_dat
CHECK_SPU_IDS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_om_api", "beautycard_request.yaml")
CHECK_SPU_IDS = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_data", "check_spu_ids.yaml")
#om-achelous
ACHELOUS_REQUEST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_om_api", "achelous_request.yaml")
#直播-om后台-批量添加美购
BATCH_ADD_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_om_data/achelous_data", "batch_add_service.yaml")
#次卡商详页
BEAUTY_CARD_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_detail.yaml")
......@@ -600,6 +627,22 @@ SEARCHGIFTS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_
ADDLIVESERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
ADDLIVESERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "add_live_service.yaml")
#主播-推荐袋添加尾款券(主播账号为机构或医生)
ADDLIVEGIFT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
ADDLIVEGIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "add_live_gift.yaml")
#主播-添加商品后,购物车上方弹出商品卡片
POP_SERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
POP_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "pop_service.yaml")
#OM后台-弹出美券
POP_GIFT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
POP_GIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "pop_gift.yaml")
#用户-领取美券
GET_GIFT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
GET_GIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "get_gift.yaml")
#主播-推荐袋删除商品
DELETELIVESERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
DELETELIVESERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "delete_live_service.yaml")
......@@ -624,6 +667,14 @@ LEAVE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "leav
FINISH_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "live_request.yaml")
FINISH = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "finish.yaml")
#直播结束-主播下播
REPLAY_INFO_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "live_request.yaml")
REPLAY_INFO = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "replay_info.yaml")
#直播回放-查看直播间弹幕
REPLAY_MSG_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "live_request.yaml")
REPLAY_MSG = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "replay_msg.yaml")
#主播标记讲解商品+取消标记
MARK_LIVE_SERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
MARK_LIVE_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "mark_live_service.yaml")
......@@ -684,5 +735,18 @@ FAVORS_TOPICS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data
#直播-新增标签
TAG_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "tag_request.yaml")
TAG_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/tag_data", "tag_add.yaml")
#我的-收藏-帖子
FAVORS_TRACTATE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
FAVORS_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "favors_tractate.yaml")
#我的-收藏-帖子
FAVORS_ANSWERS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
FAVORS_ANASWERS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "favors_answers.yaml")
#我的-头像点击
ACCOUNT_HOMEPAGE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "account_request.yaml")
ACCOUNT_HOMEPAGE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data", "account_homepage.yaml")
if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG)
\ 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_backend_api.account_request import account_request
class TestAccount_Homepage:
data = BaseRequest().api_load(path_setting.ACCOUNT_HOMEPAGE)
account_homepage_case, account_homepage_data = get_ids(data, "account_homepage")
@pytest.mark.parametrize("param", account_homepage_data, ids=account_homepage_case)
def test_account_homepage(self, param):
r = account_request().account_homepage(param["user_id"], param["device_id"])
assert r["error"] == param["assert"]
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
......@@ -13,15 +13,10 @@ class TestDiaryUpdate:
@pytest.mark.parametrize("param", diary_update_data, ids=diary_update_case)
def test_diary_update(self, param):
r = diary_request().diary_update(param["topic_list"])
# print(r)
# if r["error"] == 0:
# assert r["message"] == param["assert"]
if r["error"] == 1:
assert r["message"] == param["message"]
# 校验--如果是因为发布频繁导致的错误就不用理会-如果是其他再判断
# 收藏之后取消收藏?为啥能成功?
......
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.diary_request import diary_request
class TestVote:
data = BaseRequest().api_load(path_setting.DIARY_VOTE)
diary_vote_case, diary_vote_data = get_ids(data, "diary_vote")
@pytest.mark.parametrize("param", diary_vote_data, ids=diary_vote_case)
def test_vote(self, param):
r = diary_request().diary_vote(param["diary_id"])
# 如果点赞成功,就走取消点赞的流程,否则先取消点赞再去点赞
if r["message"] == param["assert2"]:
# 之后取消点赞。【最后保持取消点赞的状态】
cancel_vote = diary_request().diary_cancel_vote(param["diary_id"])
assert cancel_vote["error"] == 0
else:
# 如果是已经点过赞的状态就直接取消点赞,然后再走一遍点赞-取消点赞;一般不走这边除非手动点过这个卡片
assert r["message"] == param["assert3"]
cancel_vote = diary_request().diary_cancel_vote(param["diary_id"])
assert cancel_vote["error"] == 0
vote = diary_request().diary_vote(param["diary_id"])
assert vote["message"] == param["assert2"]
cancel_vote = diary_request().diary_cancel_vote(param["diary_id"])
assert cancel_vote["error"] == 0
......@@ -7,7 +7,7 @@ from all_backend_api.hybrid_api_topic_request import hybrid_api_topic_request
class TestDiaryVote:
data = BaseRequest().api_load(path_setting.DIARY_VOTE)
data = BaseRequest().api_load(path_setting.DIARY_TOPIC_VOTE)
diary_vote_case, diary_vote_data = get_ids(data, "diary_vote")
@pytest.mark.parametrize("param", diary_vote_data, ids=diary_vote_case)
......
import pytest
from ids_list import get_ids
import path_setting
from all_backend_api.janus_request import janus_request
from in_common.base_request import BaseRequest
class TestSalesLeadSpuByDiary:
data = BaseRequest().api_load(path_setting.SPU_BY_DIARY)
sales_lead_spu_by_diary_case, sales_lead_spu_by_diary_data = get_ids(data, "sales_lead_spu_by_diary")
@pytest.mark.parametrize("param",sales_lead_spu_by_diary_data, ids=sales_lead_spu_by_diary_case)
def test_sales_lead_spu_by_diary(self,param):
r = janus_request().sales_lead_spu_by_diary(param["diary_id"])
if r["error"] == 0:
assert r["error"] == param["assert"]
if param["spu_info"] == 1:
assert r["data"]["spu_info"]
else:
assert r["data"]["spu_info"] is None
import pytest
import path_setting
from all_backend_api.janus_live_request import live_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestAddLiveGift:
data = BaseRequest().api_load(path_setting.ADDLIVEGIFT)
addlivegift_case, addlivegift_data = get_ids(data, "add_live_gift")
@pytest.mark.parametrize("param", addlivegift_data, ids=addlivegift_case)
def test_add_live_gift(self, param):
print(111111111111111111111)
r = live_request().add_live_gift(param["channel_id"], param["doctor_gift_ids"], param["platform_gift_ids"], param["stream_id"], param["version"])
if r["error"] == 0:
assert r["data"]["toast"] == param["assert"]
live_request().delete_live_gift("739", "59127", "1", "4283", "7.45.0")
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.janus_live_request import live_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestGetGift:
data = BaseRequest().api_load(path_setting.GET_GIFT)
get_gift_case, get_gift_data = get_ids(data, "get_gift")
@pytest.mark.parametrize("param", get_gift_data, ids=get_gift_case)
def test_get_gift(self,param):
r = live_request().get_gift(param["gift_id"], param["version"])
if r["message"] == "领取成功!":
print("用户成功领取美券~")
assert r["data"]["has_gift_left"] == param["assert"]
else:
print("出错了!!!")
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.janus_live_request import live_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestPopGift:
data = BaseRequest().api_load(path_setting.POP_GIFT)
pop_gift_case, pop_gift_data = get_ids(data, "pop_gift")
@pytest.mark.parametrize("param", pop_gift_data, ids=pop_gift_case)
def test_pop_gift(self,param):
r = live_request().pop_gift(param["stream_id"], param["gift_id"], param["version"])
if r["data"] is not None:
print("成功弹出美券")
assert r["data"]["gift_id"] == param["assert"]
else:
print("出错了!!!")
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.janus_live_request import live_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestPopService:
data = BaseRequest().api_load(path_setting.POP_SERVICE)
pop_service_case, pop_service_data = get_ids(data, "pop_service")
@pytest.mark.parametrize("param", pop_service_data, ids=pop_service_case)
def test_pop_service(self,param):
r = live_request().pop_service(param["stream_id"], param["live_service_id"], param["pop_type"], param["version"])
if r["error"] == 0:
print("成功弹出商品卡片")
assert r["data"]["live_service_id"] == param["assert"]
else:
print("出错了!!!")
\ 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_backend_api.live_request import living_request
class TestReplayInfo:
data = BaseRequest().api_load(path_setting.REPLAY_INFO)
replay_info_case, replay_info_data = get_ids(data,"replay_info")
@pytest.mark.parametrize("param", replay_info_data, ids=replay_info_case)
def test_replay_info(self, param):
r = living_request().replay_info(param["topic_id"], param["version"])
if r["error"] == 0:
assert r["data"]["topic_id"] == param["assert"]
print("看看直播回放咯")
\ 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_backend_api.live_request import living_request
class TestReplayMsg:
data = BaseRequest().api_load(path_setting.REPLAY_MSG)
replay_msg_case, replay_msg_data = get_ids(data,"replay_msg")
@pytest.mark.parametrize("param", replay_msg_data, ids=replay_msg_case)
def test_replay_msg(self, param):
r = living_request().replay_msg(param["topic_id"], param["version"])
if r["error"] == 0:
assert r["data"]["245"][0]["type"] == param["assert"]
print("看看直播回放的弹幕~")
\ 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_backend_api.query_request import query_request
class TestPresetWords:
data = BaseRequest().api_load(path_setting.QUERY_PRESET_WORDS)
preset_words_case, preset_words_data = get_ids(data, "preset_words")
@pytest.mark.parametrize("param", preset_words_data, ids=preset_words_case)
def test_PresetWords(self, param):
r = query_request().preset_words(param["id"], param["type"])
# 因问答详情页接口返回不一样所以加了个标示位
key = "is_question_answer"
if param["is_preset_words"] == 1:
assert len(r["data"]["tags"]) == param["len"]
else:
if key in param.keys():
assert len(r["data"]["tags"]) == param["len"]
else:
assert len(r["data"]) == param["len"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.user_request import user_request
class TestFavorsAnswers:
data = BaseRequest().api_load(path_setting.FAVORS_ANASWERS)
favors_answers_case, favors_answers_data = get_ids(data, "favors_answers")
@pytest.mark.parametrize("param", favors_answers_data, ids=favors_answers_case)
def test_favors_answers(self, param):
r = user_request().favors_answers(param["page"], param["count"])
assert r["error"] == param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.user_request import user_request
class TestFavorsTractate:
data = BaseRequest().api_load(path_setting.FAVORS_TRACTATE)
favors_tractate_case, favors_tractate_data = get_ids(data, "favors_tractate")
@pytest.mark.parametrize("param", favors_tractate_data, ids=favors_tractate_case)
def test_favors_tractate(self, param):
r = user_request().favors_tractate(param["page"], param["count"])
assert r["error"] == param["assert"]
account_homepage:
#我的-头像点击
-
case: "我的页面-头像点击"
user_id: 33910245
device_id: androidid_16a95f3fa31a4c0b
assert: 0
detail_live:
-
case: "直播私信主播"
referrer_id: 737
assert: 0
\ No newline at end of file
diary_vote:
#点赞case--从日记本卡片对日记本点赞
-
case: "日记本卡片点赞日记本--点赞&取消点赞成功case--校验"
diary_id: 17586091
assert1:
assert2: " +1"
assert3: "已经赞过啦"
diary_vote:
#点赞case--从日记本列表点赞
-
case: "日记本列表点赞--点赞&取消点赞成功case--校验"
case: "日记本列表点赞日记贴--点赞&取消点赞成功case--校验"
id: 21249958
topic_id: 21249958
assert1: 0
......
hospital_search:
#北京画美医院主页
-
#医院主页搜索---搜索成功,有数据召回
case: "医院主页搜索---搜索成功,当前搜索词召回的对应商品不少于5个,不展示热卖推荐商品"
query: "玻尿酸"
device_id: "1321222222222222135"
hospital_id: "96ea37eef81d11e692f800163e000a4a"
hospital_id: "fb38be6e52b34b6d8efe7a30d2c93022"
current_city_id: "beijing"
version: "742.2"
offset: "0"
size: "10"
assert1: 0
assert1: 5
assert2: 0
-
......@@ -17,7 +18,7 @@ hospital_search:
case: "医院主页搜索---搜索成功,当前搜索词下无对应商品,召回热卖推荐商品"
query: "美白针"
device_id: "1321222222222222135"
hospital_id: "96ea37eef81d11e692f800163e000a4a"
hospital_id: "fb38be6e52b34b6d8efe7a30d2c93022"
current_city_id: "beijing"
version: "742.2"
offset: "0"
......@@ -30,7 +31,7 @@ hospital_search:
case: "医院主页搜索---搜索成功,当前搜索词召回的对应商品少于5个,展示热卖推荐商品"
query: "瘦脸针"
device_id: "1321222222222222135"
hospital_id: "96ea37eef81d11e692f800163e000a4a"
hospital_id: "fb38be6e52b34b6d8efe7a30d2c93022"
current_city_id: "beijing"
version: "742.2"
offset: "0"
......
# 日记本大图关联美购--其实和日记本关联的美购一致
# 用spu_info来作为标示位
# id 是必传项
sales_lead_spu_by_diary:
-
case: "日记本大图关联美购--存在美购"
diary_id: 15261339
spu_info: 1
assert: 0
-
case: "日记本大图关联美购--不存在美购"
diary_id: 17586195
spu_info: null
assert: 0
\ No newline at end of file
add_live_gift:
#主播-推荐袋添加尾款券(主播账号为机构或医生)
-
case: "主播-推荐袋添加尾款券(主播账号为机构或医生),尾款券添加成功"
channel_id: "739"
doctor_gift_ids: "59127"
platform_gift_ids: ""
stream_id: "4283"
version: "7.45.0"
assert : 成功添加1个美券
\ No newline at end of file
get_gift:
#用户-领取美券
-
case: "用户-领取美券"
gift_id: "59124"
version : "7.46.0"
assert: 1
\ No newline at end of file
pop_gift:
#在om后台添加美券后,点击弹出,直播间弹出美券
-
case: "在om后台添加美券后,点击弹出,直播间弹出美券"
stream_id: "4271"
gift_id: "59124"
version : "7.46.0"
assert: 59124
\ No newline at end of file
pop_service:
#主播添加商品后,购物车上方成功弹出一个商品卡片
-
case: "主播添加商品后,购物车上方成功弹出一个商品卡片"
stream_id: "4266"
live_service_id: "7324"
pop_type: "1"
version : "7.46.0"
assert: 7324
\ No newline at end of file
replay_info:
#看看直播回放咯
-
case: "看看直播回放咯"
topic_id: "123456978"
version: "7.45.0"
assert: 123456978
\ No newline at end of file
replay_msg:
#看看直播回放的弹幕~
-
case: "看看直播回放的弹幕~"
topic_id: "123456978"
version: "7.45.0"
assert: 2
\ No newline at end of file
preset_words:
#详情页预置词
#is_preset_words 用来case判断有没有预置词,因为两个的判定条件不一样,这样写简单点
# is_question_answer 问答详情页的单独标示位
-
case: "不存在预置词--日记本详情页--校验"
id: 17586091
type: 1
len: 0
is_preset_words: 0
-
case: "存在一个预置词--日记本详情页--校验"
id: 15714021
type: 1
len: 1
is_preset_words: 1
-
case: "存在两个预置词--日记本详情页--校验"
id: 17004877
type: 1
len: 2
is_preset_words: 1
-
case: "不存在预置词--日记贴详情页--校验"
id: 123456954
type: 2
len: 0
is_preset_words: 0
-
case: "存在一个预置词--日记贴详情页--校验"
id: 21129553
type: 2
len: 1
is_preset_words: 1
-
case: "存在两个预置词--日记贴详情页--校验"
id: 21149097
type: 2
len: 2
is_preset_words: 1
-
case: "不存在预置词--问答详情页--校验---单独校验这个返回方式和别的不一样"
id: 357125
type: 3
len: 0
is_preset_words: 0
is_question_answer : 1
-
case: "存在一个预置词--问答详情页--校验"
id: 181212
type: 3
len: 1
is_preset_words: 1
-
case: "存在两个预置词--问答详情页--校验"
id: 124225
type: 3
len: 2
is_preset_words: 1
-
case: "不存在预置词--回答详情页--校验"
id: 1008579
type: 4
len: 0
is_preset_words: 0
-
case: "存在一个预置词--回答详情页--校验"
id: 246245
type: 4
len: 1
is_preset_words: 1
-
case: "存在两个预置词--回答详情页--校验"
id: 867689
type: 4
len: 2
is_preset_words: 1
-
case: "不存在预置词--帖子详情页--校验"
id: 187937
type: 5
len: 0
is_preset_words: 0
-
case: "存在一个预置词--帖子详情页--校验"
id: 44534
type: 5
len: 1
is_preset_words: 1
-
case: "存在两个预置词--帖子详情页--校验"
id: 172774
type: 5
len: 2
is_preset_words: 1
......@@ -3,11 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-07-22 18:42:59
content: ces测试+2021-07-14 18:15:39
content: ces测试+2021-08-03 15:01:46
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......
favors_answers:
#我的-收藏-回答
-
case: "我的页面-收藏-回答"
page: 1
count: 10
assert: 0
favors_tractate:
#我的-收藏-帖子
-
case: "我的页面-收藏-帖子"
page: 1
count: 10
assert: 0
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"]
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
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
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
import pytest
import path_setting
from all_om_api.achelous_request import achelous_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestBatchAddService:
data = BaseRequest().api_load(path_setting.BATCH_ADD_SERVICE)
batch_add_service_case, batch_add_service_data = get_ids(data, "batch_add_service")
@pytest.mark.parametrize("param",batch_add_service_data,ids=batch_add_service_case)
def test_batch_add_service(self,param):
r = achelous_request().batch_add_service(param['stream_id'],param['service_item_ids'])
#print(type(r["failed_service_item_ids"]))
if r.get("code") == 1:
assert r['message'] == param["assert"]
elif len(r["failed_service_item_ids"]) == 0:
assert r["success_service_item_ids"] == param["assert2"]
elif r["success_service_item_ids"] == 0:
assert r["success_service_item_ids"] == param["assert1"]
batch_add_service:
-
case: "om-直播-批量添加一件美购"
stream_id: "4166"
service_item_ids: "73809"
assert2: [73809]
-
case: "om-直播-批量添加多件美购"
stream_id: "4166"
service_item_ids: "23508,33823"
assert2: [33823,23508]
-
case: "om-直播添加商品-输入不合法符号"
stream_id: "4166"
service_item_ids: "73809,23508,33823"
assert: "请输入合法的SKU ID以,隔开"
-
case: "om-直播-添加错误美购id"
stream_id: "4166"
service_item_ids: "235"
assert1: '[235]'
\ No newline at end of file
......@@ -3,7 +3,7 @@ check_sku_ids:
#按SKU导入-导入单条数据,导入成功
-
case : "按SKU导入-导入单条数据,导入成功"
sku_ids : '[{"import_id":"10066","rank":0,"row":1}]'
sku_ids : '[{"import_id":"10252","rank":0,"row":1}]'
assert : ''
#按SKU导入-导入单条数据,ID不存在
......
......@@ -48,7 +48,7 @@ get_related_bc:
bc_spu_id : ""
page : "0"
page_size : "10"
assert: 0
assert: None
#按SKU导入-根据专题和次卡spu_id、sku_id获取已添加页面次卡spu和sku列表
-
......@@ -58,7 +58,7 @@ get_related_bc:
bc_spu_id : "100023"
page : "0"
page_size : "10"
assert: 0
assert: None
#按SPU导入-录入错误的spu_id,点击查询
-
......
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