Commit 57f51e2e authored by 张淑琴's avatar 张淑琴

Merge branch 'common_dev' into zzsq_dev

parents 867e686c 9b4bfe26
...@@ -107,3 +107,6 @@ venv.bak/ ...@@ -107,3 +107,6 @@ venv.bak/
host.yaml host.yaml
.DS_Store .DS_Store
*/.DS_Store */.DS_Store
# docmentatiion path
test_backend_data/topic_data/topic_reply_create.yaml
\ No newline at end of file
...@@ -15,16 +15,16 @@ class diary_request(BaseRequest): ...@@ -15,16 +15,16 @@ class diary_request(BaseRequest):
return self.api_send(self.data["cancelfavor"]) return self.api_send(self.data["cancelfavor"])
# 更新日记本信息 # 更新日记本信息
def diary_operation(self, diary_id, title, operation_timestamp, doctor_name, hospital_name): def diary_additional_info(self, diary_id, title, operation_timestamp, doctor_name, hospital_name):
self.params["diary_id"] = diary_id self.params["diary_id"] = diary_id
self.params["title"] = title self.params["title"] = title
self.params["operation_timestamp"] = operation_timestamp self.params["operation_timestamp"] = operation_timestamp
self.params["doctor_name"] = doctor_name self.params["doctor_name"] = doctor_name
self.params["hospital_name"] = hospital_name self.params["hospital_name"] = hospital_name
return self.api_send(self.data["operation"]) return self.api_send(self.data["additional_info"])
# 添加信息--待争议 # 添加信息--待争议
def diary_additional_info(self): def diary_operation(self):
return self.api_send(self.data["operation"]) return self.api_send(self.data["operation"])
# 详情页-内容 # 详情页-内容
......
...@@ -18,7 +18,7 @@ cancelfavor: ...@@ -18,7 +18,7 @@ cancelfavor:
# #
#日记本修改信息 #日记本修改信息
operation: additional_info:
method: post method: post
url: /api/diary/additional_info/v2 url: /api/diary/additional_info/v2
params: params:
...@@ -34,8 +34,8 @@ operation: ...@@ -34,8 +34,8 @@ operation:
#查看日记修改信息页面 # 查看日记修改信息页面
additional_info: operation:
method: get method: get
url: /api/diary/operation/17586147/ url: /api/diary/operation/17586147/
params: params:
......
...@@ -3,6 +3,7 @@ services: ...@@ -3,6 +3,7 @@ services:
method: get method: get
url: /api/doctor_v2/5bd9f05cad51403d853ba8c881989e23/services url: /api/doctor_v2/5bd9f05cad51403d853ba8c881989e23/services
params: params:
device_id: B3248423-2EA5-495B-D3CA-AFB8F99417EC
offset: 0 offset: 0
show_tag_distro: 1 show_tag_distro: 1
tag_id: all tag_id: all
......
...@@ -70,24 +70,39 @@ class feed_request(BaseRequest): ...@@ -70,24 +70,39 @@ class feed_request(BaseRequest):
return self.api_send(self.data["winning_user_lis"]) return self.api_send(self.data["winning_user_lis"])
# 模拟双眼皮,发型,眉形,美瞳,口红下,新增feed流
def index_ai(self, tag_names, scan_type, offset, current_city_id):
self.params["tag_names"] = tag_names
self.params["scan_type"] = scan_type
self.params["offset"] = offset
self.params["current_city_id"] = current_city_id
if __name__ == '__main__': return self.api_send(self.data["index_ai"])
print(feed_request().index_v9("choice", "7.42.2", "beijing"))
#社区tab页签到和招募活动列表
print(feed_request().config_list("7.44.0"))
#免费招募列表背景图片
print(feed_request().free_recruit_banner("7.44.1", " "))
# 免费招募列表
print(feed_request().free_recruit_list("7.44.1", " ", "1", "1", "10"))
# 免费招募活动详情
print(feed_request().free_recruit_detail("beijing", "43"))
# 免费招募获取用户状态 if __name__ == '__main__':
print(feed_request().user_status("beijing", "43")) # print(feed_request().index_v9("choice", "7.42.2", "beijing"))
#
# 免费招募查看中奖名单 # #社区tab页签到和招募活动列表
print(feed_request().winning_user_lis("44", " ")) # print(feed_request().config_list("7.44.0"))
\ No newline at end of file #
# #免费招募列表背景图片
# print(feed_request().free_recruit_banner("7.44.1", " "))
#
# # 免费招募列表
# print(feed_request().free_recruit_list("7.44.1", " ", "1", "1", "10"))
#
# # 免费招募活动详情
# print(feed_request().free_recruit_detail("beijing", "43"))
#
# # 免费招募获取用户状态
# print(feed_request().user_status("beijing", "43"))
#
# # 免费招募查看中奖名单
# print(feed_request().winning_user_lis("44", " "))
# print(feed_request().index_ai('["埋线双眼皮","定点双眼皮","切开双眼皮"]', 6, 2, "beijing"))
import base64
st = '40dc0558ffc3f3f14503104d:e7f609c9c6a64e5cfaa3c9e0'.encode() # 默认以utf8编码
res = base64.b64encode(st)
print(res.decode())
\ No newline at end of file
...@@ -89,3 +89,13 @@ winning_user_lis: ...@@ -89,3 +89,13 @@ winning_user_lis:
data: data:
json: { } json: { }
isLogin: 1 isLogin: 1
# 模拟双眼皮,发型,眉形,美瞳,口红下,新增feed流
index_ai:
method: get
url: /api/feed/index/ai
params:
tag_names: ${tag_names}
scan_type: ${scan_type}
offset: ${offset}
current_city_id: ${current_city_id}
\ No newline at end of file
...@@ -3,6 +3,7 @@ services: ...@@ -3,6 +3,7 @@ services:
method: get method: get
url: /api/hospitals_v2/bjxyjcpfbyy/services url: /api/hospitals_v2/bjxyjcpfbyy/services
params: params:
device_id: B3248423-2EA5-495B-D3CA-AFB8F99417EC
offset: 0 offset: 0
show_tag_distro: 1 show_tag_distro: 1
tag_id: "all" tag_id: "all"
......
...@@ -8,6 +8,7 @@ class live_request(BaseRequest): ...@@ -8,6 +8,7 @@ class live_request(BaseRequest):
self.data = self.api_load(path_setting.LIVEGIFTS_CONFIG) 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.SEARCHSERVICE_CONFIG)
self.data = self.api_load(path_setting.ADDLIVESERVICE_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_SERVICE_CONFIG)
self.data = self.api_load(path_setting.POP_GIFT_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.GET_GIFT_CONFIG)
...@@ -70,6 +71,15 @@ class live_request(BaseRequest): ...@@ -70,6 +71,15 @@ class live_request(BaseRequest):
self.params["version"] = version self.params["version"] = version
return self.api_send(self.data["pop_service"]) 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后台-弹出美券 #om后台-弹出美券
def pop_gift(self, stream_id, gift_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'): def pop_gift(self, stream_id, gift_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["stream_id"] = stream_id self.params["stream_id"] = stream_id
...@@ -131,9 +141,11 @@ if __name__ == '__main__': ...@@ -131,9 +141,11 @@ if __name__ == '__main__':
# print(live_request().search_service("beijing", "745", "", "0", "20", "7.45.0")) # 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().add_live_service("745", "560641", "7.45.0"))
# print(live_request().delete_live_service("745", "7242", "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().m_get_channel_status("745", "7.46.0"))
# print(live_request().mark_live_service("4233", "745", "7269", "1", "746.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().audience_services("4179","739","0","20"))
# print(live_request().pop_service("4266", "7324", "1", "746.0")) # 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().pop_gift("4271", "59124", "746.0"))
print(live_request().get_gift( "59124", "746.0")) # print(live_request().get_gift( "59124", "746.0"))
\ No newline at end of file \ No newline at end of file
...@@ -65,6 +65,20 @@ pop_service: ...@@ -65,6 +65,20 @@ pop_service:
json: {} json: {}
isLogin: 1 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后台-弹出美券 #om后台-弹出美券
pop_gift: pop_gift:
method: GET method: GET
......
...@@ -70,7 +70,7 @@ class janus_request(BaseRequest): ...@@ -70,7 +70,7 @@ class janus_request(BaseRequest):
def mine_guess_you_like(self): def mine_guess_you_like(self):
return self.api_send(self.data["mine_guess_you_like"]) return self.api_send(self.data["mine_guess_you_like"])
#商祥页-详情 #商祥页-详情/商祥页-本院推荐
def product_detail(self, service_id, service_item_id, version): def product_detail(self, service_id, service_item_id, version):
self.params["service_id"] = service_id self.params["service_id"] = service_id
self.params["service_item_id"] = service_item_id self.params["service_item_id"] = service_item_id
...@@ -89,6 +89,13 @@ class janus_request(BaseRequest): ...@@ -89,6 +89,13 @@ class janus_request(BaseRequest):
self.params["tab_id"] = tab_id self.params["tab_id"] = tab_id
return self.api_send(self.data["product_coupon_my_list"]) return self.api_send(self.data["product_coupon_my_list"])
# 商祥页-商品推荐-新接口-748以上
def service_promotion_related_service_data(self, service_id, page, current_city_id):
self.params["service_id"] = service_id
self.params["page"] = page
self.params["current_city_id"] = current_city_id
return self.api_send(self.data["service_promotion_related_service_data"])
# 品类聚合页面商品列表 # 品类聚合页面商品列表
def tag_service(self, size, tag_ids, offset, tag_id, version, device_id): def tag_service(self, size, tag_ids, offset, tag_id, version, device_id):
print("fgx") print("fgx")
...@@ -296,33 +303,33 @@ if __name__ == '__main__': ...@@ -296,33 +303,33 @@ if __name__ == '__main__':
#打印购物车-猜你喜欢列表接口返回 #打印购物车-猜你喜欢列表接口返回
# print(janus_request().mine_guess_you_like()) # print(janus_request().mine_guess_you_like())
#打印商祥页-详情接口返回 #打印商祥页-详情接口返回
print(janus_request().product_detail("5857263", "618788", "7.43.0")) # print(janus_request().product_detail("5857263", "618788", "7.43.0"))
#打印商祥页-sku信息接口返回 # #打印商祥页-sku信息接口返回
print(janus_request().sku_info("5857263", "618788")) # print(janus_request().sku_info("5857263", "618788"))
#打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回 # #打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回
print(janus_request().product_coupon_my_list(0, 0)) # print(janus_request().product_coupon_my_list(0, 0))
#
#品类聚合页面商品列表接口返回 # #品类聚合页面商品列表接口返回
# print(janus_request().tag_service()) # # print(janus_request().tag_service())
print("fgx") # print("fgx")
#
#品类聚合页面标签和专场 # #品类聚合页面标签和专场
# print(janus_request().polymer()) # # print(janus_request().polymer())
print("fgx") # print("fgx")
#
#打印次卡-确认订单接口返回 # #打印次卡-确认订单接口返回
print(janus_request().beauty_card_order_confirm("10176", 1, 1, 0)) # print(janus_request().beauty_card_order_confirm("10176", 1, 1, 0))
#打印次卡-确认订单页面-修改手机号接口返回 # #打印次卡-确认订单页面-修改手机号接口返回
print(janus_request().beauty_card_update_phone("+8612348543876", 1, "084430")) # print(janus_request().beauty_card_update_phone("+8612348543876", 1, "084430"))
#打印次卡-提交订单接口返回 # #打印次卡-提交订单接口返回
print(janus_request().beauty_card_order_submit("12345678912", "10176", 1, 1, 0, 0)) # print(janus_request().beauty_card_order_submit("12345678912", "10176", 1, 1, 0, 0))
#打印次卡-支付平台接口返回 # #打印次卡-支付平台接口返回
print(janus_request().beauty_card_payment_method("101670448736595")) # print(janus_request().beauty_card_payment_method("101670448736595"))
#
print(janus_request().product_my_list(0, 0)) # print(janus_request().product_my_list(0, 0))
#
# 次卡商详页-适应机构 # # 次卡商详页-适应机构
print(janus_request().beauty_card_service_hospital("10046", 20, 0, 1)) # print(janus_request().beauty_card_service_hospital("10046", 20, 0, 1))
# #打印购物车-猜你喜欢列表接口返回 # #打印购物车-猜你喜欢列表接口返回
# print(janus_request().mine_guess_you_like()) # print(janus_request().mine_guess_you_like())
# #打印商祥页-详情接口返回 # #打印商祥页-详情接口返回
...@@ -366,13 +373,14 @@ if __name__ == '__main__': ...@@ -366,13 +373,14 @@ if __name__ == '__main__':
# #直播-点击【设置封面】 # #直播-点击【设置封面】
# print("直播-点击【设置封面】") # print("直播-点击【设置封面】")
# print(janus_request().page_rules("744.2", "beijing", "post_add_pic")) # print(janus_request().page_rules("744.2", "beijing", "post_add_pic"))
#直播-点击【设置封面】 # #直播-点击【设置封面】
print("直播-点击【设置封面】") # print("直播-点击【设置封面】")
print(janus_request().page_rules("744.2", "beijing", "post_add_pic")) # print(janus_request().page_rules("744.2", "beijing", "post_add_pic"))
#直播-主播获取美颜 # #直播-主播获取美颜
print("meiyan") # print("meiyan")
print(janus_request().beauty("739")) # print(janus_request().beauty("739"))
#直播-主播修改美颜 # #直播-主播修改美颜
print("change meiyan") # print("change meiyan")
print(janus_request().beauty_post("739","true","0.60","0.40","0.70")) # print(janus_request().beauty_post("739","true","0.60","0.40","0.70"))
# 商祥页-推荐商品-新接口
print(janus_request().service_promotion_related_service_data('5828374', 1, 'beijing'))
...@@ -69,6 +69,21 @@ product_coupon_my_list: ...@@ -69,6 +69,21 @@ product_coupon_my_list:
json: {} json: {}
isLogin: 1 isLogin: 1
#商祥页-推荐商品-新接口-748以上
service_promotion_related_service_data:
method: get
url: /api/janus/service/promotion/related_service/_data
params:
service_id: ${service_id}
page: ${page}
current_city_id: ${current_city_id}
version: "7.48.0"
lat: "39.983161"
lng: "116.488078"
data: {}
json: {}
isLogin: 1
#品类聚合页面商品列表的 #品类聚合页面商品列表的
tag_service: tag_service:
method: GET method: GET
......
...@@ -46,6 +46,18 @@ class living_request(BaseRequest): ...@@ -46,6 +46,18 @@ class living_request(BaseRequest):
self.params["version"] = version self.params["version"] = version
return self.api_send(self.data["finish"]) 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"): def get_live_info_audience(self,channel_id, version, device_id="97B6764B-2135-4761-9911-701C38CBC272"):
self.params["channel_id"] = channel_id self.params["channel_id"] = channel_id
...@@ -56,8 +68,10 @@ class living_request(BaseRequest): ...@@ -56,8 +68,10 @@ class living_request(BaseRequest):
if __name__ == '__main__': if __name__ == '__main__':
(living_request().danmu_v2("739", "1")) # (living_request().danmu_v2("739", "1"))
(living_request().pushlive_info("小冤家", "2021/04/22/1003/cef471cff5e6", "", "1", "1", "1")) # (living_request().pushlive_info("小冤家", "2021/04/22/1003/cef471cff5e6", "", "1", "1", "1"))
print (living_request().sendmsg("739","你好")) # print (living_request().sendmsg("739","你好"))
print(living_request().finish("745", "746.0")) # print(living_request().finish("745", "746.0"))
print(living_request().get_live_info_audience("745", "7.46.0")) # print(living_request().get_live_info_audience("745", "7.46.0"))
\ No newline at end of file # 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: ...@@ -69,6 +69,28 @@ finish:
json: {} json: {}
isLogin: 1 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: get_live_info_audience:
method: GET method: GET
......
...@@ -13,7 +13,13 @@ class services_request(BaseRequest): ...@@ -13,7 +13,13 @@ class services_request(BaseRequest):
self.params["u_id"] = u_id self.params["u_id"] = u_id
return self.api_send(self.data["share_data"]) return self.api_send(self.data["share_data"])
# 普通美券点击立即使用
def v1(self, coupon_info_id, order_by):
self.params["coupon_info_id"] = coupon_info_id
self.params["order_by"] = order_by
return self.api_send(self.data["share_data"])
if __name__ == '__main__': if __name__ == '__main__':
#打印商祥页-分享接口返回 #打印商祥页-分享接口返回
print(services_request().share_data("5857263", "618788")) # print(services_request().share_data("5857263", "618788"))
\ No newline at end of file print(services_request().v1(32366785, 0))
\ No newline at end of file
...@@ -7,3 +7,12 @@ share_data: ...@@ -7,3 +7,12 @@ share_data:
u_id: ${u_id} u_id: ${u_id}
data: {} data: {}
json: {} json: {}
#获取美购列表,美券
share_data:
method: get
url: /api/services/v1
params:
coupon_info_id: ${coupon_info_id}
order_by: ${order_by}
\ No newline at end of file
...@@ -15,6 +15,13 @@ class skin_request(BaseRequest): ...@@ -15,6 +15,13 @@ class skin_request(BaseRequest):
self.params["device_id"] = device_id self.params["device_id"] = device_id
return self.api_send(self.data["skin_recommend_service"]) return self.api_send(self.data["skin_recommend_service"])
# 测肤根据需求获取方案
def skin_scheme_card(self, scene_id, target_id, recover_time_id):
self.params["scene_id"] = scene_id
self.params["target_id"] = target_id
self.params["recover_time_id"] = recover_time_id
return self.api_send(self.data["skin_scheme_card"])
if __name__ == '__main__': if __name__ == '__main__':
print(skin_request().skin_recommend_service("androidid_7255c3398845cdd5", "beijing", '[2306,2303,2551,2355,2322,2337]', 0, 10)) # print(skin_request().skin_recommend_service("androidid_7255c3398845cdd5", "beijing", '[2306,2303,2551,2355,2322,2337]', 0, 10))
print(skin_request().skin_scheme_card(1, 1, 1))
...@@ -7,3 +7,11 @@ skin_recommend_service: ...@@ -7,3 +7,11 @@ skin_recommend_service:
size: ${size} size: ${size}
appeal_tag_ids: ${appeal_tag_ids} appeal_tag_ids: ${appeal_tag_ids}
device_id: ${device_id} device_id: ${device_id}
skin_scheme_card:
method: get
url: /api/skin/scheme/card
params:
scene_id: ${scene_id}
target_id: ${target_id}
recover_time_id: ${recover_time_id}
\ No newline at end of file
...@@ -23,10 +23,11 @@ class user_request(BaseRequest): ...@@ -23,10 +23,11 @@ class user_request(BaseRequest):
def __init__(self): def __init__(self):
self.data = self.api_load(path_setting.TOPIC_FAVOR_CONFIG) self.data = self.api_load(path_setting.TOPIC_FAVOR_CONFIG)
#日记贴帖子相关-收藏 # 日记贴帖子相关-收藏
def topic_favor(self): def topic_favor(self):
return self.api_send(self.data["favor"]) return self.api_send(self.data["favor"])
#日记贴取消收藏
# 日记贴取消收藏
def topic_canclefavor(self): def topic_canclefavor(self):
return self.api_send(self.data["canclefavor"]) return self.api_send(self.data["canclefavor"])
...@@ -36,7 +37,7 @@ class user_request(BaseRequest): ...@@ -36,7 +37,7 @@ class user_request(BaseRequest):
self.params["from_live"] = from_live self.params["from_live"] = from_live
return self.api_send(self.data['follow_add']) return self.api_send(self.data['follow_add'])
#取消关注 # 取消关注
def follow_del(self,uid,from_live): def follow_del(self,uid,from_live):
self.params["uid"] = uid self.params["uid"] = uid
self.params["from_live"] = from_live self.params["from_live"] = from_live
...@@ -45,14 +46,12 @@ class user_request(BaseRequest): ...@@ -45,14 +46,12 @@ class user_request(BaseRequest):
#我的-日记 # 我的-日记
def my_diary_v2(self, start_num, count): def my_diary_v2(self, start_num, count):
self.params["start_num"] = start_num self.params["start_num"] = start_num
self.params["count"] = count self.params["count"] = count
return self.api_send(self.data["my_diary_v2"]) return self.api_send(self.data["my_diary_v2"])
# 我的-帖子-我发布的 # 我的-帖子-我发布的
...@@ -119,6 +118,20 @@ class user_request(BaseRequest): ...@@ -119,6 +118,20 @@ class user_request(BaseRequest):
return self.api_send(self.data["favors_topics"]) return self.api_send(self.data["favors_topics"])
# 签到--签到基础信息
def base_sign_data(self):
return self.api_send(self.data["base_sign_data"])
# 签到--签到兑换记录
def sign_exchanged(self):
return self.api_send(self.data["sign_exchanged"])
# 签到--日历
def sign_calendar(self,year='2021',month='8'):
self.params["year"] = year
self.params["month"] = month
return self.api_send(self.data["sign_calendar"])
# 我的-收藏-帖子 # 我的-收藏-帖子
def favors_tractate(self, page, count): def favors_tractate(self, page, count):
...@@ -137,6 +150,8 @@ class user_request(BaseRequest): ...@@ -137,6 +150,8 @@ class user_request(BaseRequest):
if __name__ == '__main__': if __name__ == '__main__':
#个人中心 #个人中心
print(user_request().personal_center()) print(user_request().personal_center())
...@@ -173,12 +188,6 @@ if __name__ == '__main__': ...@@ -173,12 +188,6 @@ if __name__ == '__main__':
# 我的-收藏-日记贴 # 我的-收藏-日记贴
print(user_request().favors_topics(0, 10)) print(user_request().favors_topics(0, 10))
# 我的-收藏-帖子
print(user_request().favors_tractate(1, 10))
# 我的-收藏-帖子
print(user_request().favors_answers(1, 10))
...@@ -157,6 +157,37 @@ favors_topics: ...@@ -157,6 +157,37 @@ favors_topics:
isLogin: 1 isLogin: 1
#签到--基础信息
base_sign_data:
method: GET
url: /api/user/base_sign_data
params:
data: {}
json: {}
isLogin: 1
#签到--奖品兑换记录
sign_exchanged:
method: GET
url: /api/user/sign_exchanged
params:
data: {}
json: {}
isLogin: 1
#签到--日历
sign_calendar:
method: GET
url: /api/user/sign_calendar
params:
year: ${year}
month: ${month}
data: {}
json: {}
isLogin: 1
# 我的-收藏-帖子 # 我的-收藏-帖子
favors_tractate: favors_tractate:
method: GET method: GET
......
...@@ -15,6 +15,58 @@ class achelous_request(BaseRequest): ...@@ -15,6 +15,58 @@ class achelous_request(BaseRequest):
# self.params["service_item_ids"] = service_item_ids # self.params["service_item_ids"] = service_item_ids
# return self.api_send(self.data["batch_add_service"]) # return self.api_send(self.data["batch_add_service"])
#OM后台-自定义专题搜索
def special_list(self, page_index, page_capacity, page_id, name, creator_name, create_time_gt, create_time_lt, is_online, status, start_time, end_time):
self.params["page_index"] = page_index
self.params["page_capacity"] = page_capacity
self.params["page_id"] = page_id
self.params["name"] = name
self.params["creator_name"] = creator_name
self.params["create_time_gt"] = create_time_gt
self.params["create_time_lt"] = create_time_lt
self.params["is_online"] = is_online
self.params["status"] = status
self.params["start_time"] = start_time
self.params["end_time"] = end_time
return self.api_send(self.data["special_list"])
#OM后台-自定义专题创建
def special_edit(self, user_id, name, id, start_time, end_time, is_online, share_title, share_content, share_pic ):
self.params["user_id"] = user_id
self.params["name"] = name
self.params["id"] = id
self.params["start_time"] = start_time
self.params["end_time"] = end_time
self.params["is_online"] = is_online
self.params["share_title"] = share_title
self.params["share_content"] = share_content
self.params["share_pic"] = share_pic
return self.api_send(self.data["special_edit"])
#OM后台-自定义专题删除
def special_delete(self, ids ):
self.params["ids"] = ids
print('*'*100)
return self.api_send(self.data["special_delete"])
#OM后台-组件库创建保存/更新保存
def page_edit(self, visualpage_id, name, visual_info):
self.params["visualpage_id"] = visualpage_id
self.params["name"] = name
self.params["visual_info"] = visual_info
return self.api_send(self.data["page_edit"])
#OM后台-自定义专题组件创建保存/更新保存
def unit_update(self, page_id, order, unit):
self.params["page_id"] = page_id
self.params["order"] = order
self.params["unit"] = unit
return self.api_send(self.data["unit_update"])
if __name__ == "__main__": if __name__ == "__main__":
print(achelous_request().batch_add_service("4176", "73809,23508,33823")) # print(achelous_request().batch_add_service("4176", "73809,23508,33823"))
# print(achelous_request().batch_del_service("4176","7312,7311")) # print(achelous_request().batch_del_service("4176","7312,7311"))
# print(achelous_request().special_edit("32244157","自定义专题创建1","0","2021-08-01 00:00:00","2021-09-30 00:00:00","1","自定义专题创建1","自定义专题创建1","https://heras.igengmei.com/4d5eef0a-78dd-43b3-98b7-137d2341f106-1628565831259"))
print(achelous_request().special_list('1', '10', '', '', '', '', '', '1', '0', '', ''))
\ No newline at end of file
...@@ -18,3 +18,75 @@ batch_add_service: ...@@ -18,3 +18,75 @@ batch_add_service:
#service_item_ids: ${service_item_ids} #service_item_ids: ${service_item_ids}
#json: {} #json: {}
#isLogin: 1 #isLogin: 1
#OM后台-自定义专题搜索
special_list:
method: GET
url: /achelous/visual/special_list
params:
page_index: ${page_index}
page_capacity: ${page_capacity}
page_id: ${page_id}
name: ${name}
creator_name: ${creator_name}
create_time_gt: ${create_time_gt}
create_time_lt: ${create_time_lt}
is_online: ${is_online}
status: ${status}
start_time: ${start_time}
end_time: ${end_time}
data: {}
json: {}
isLogin: 1
#OM后台-自定义专题创建
special_edit:
method: POST
url: /achelous/visual/special_edit
params: {}
data:
user_id: ${stream_id}
name: ${name}
id: ${id}
start_time: ${start_time}
end_time: ${end_time}
is_online: ${is_online}
share_title: ${share_title}
share_content: ${share_content}
share_pic: ${share_pic}
json: {}
isLogin: 1
#OM后台-自定义专题删除
special_delete:
method: POST
url: /achelous/visual/special_delete
params: {}
data:
ids: ${ids}
json: {}
isLogin: 1
#OM后台-自定义专题组件库创建保存/更新保存
page_edit:
method: POST
url: /achelous/visual/page_edit
params: {}
data:
visualpage_id: ${visualpage_id}
name: ${name}
visual_info: ${visual_info}
json: {}
isLogin: 1
#OM后台-自定义专题组件创建保存/更新保存
unit_update:
method: POST
url: /achelous/visual/unit_update
params: {}
data:
page_id: ${page_id}
order: ${order}
unit: ${unit}
json: {}
isLogin: 1
\ No newline at end of file
...@@ -148,6 +148,14 @@ FEED_TAB_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_ ...@@ -148,6 +148,14 @@ FEED_TAB_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_
FEED_TAB_SERVICE_DOCTORS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/service_data", "home_feed.yaml") FEED_TAB_SERVICE_DOCTORS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/service_data", "home_feed.yaml")
# 签到接口
SIGN = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "base_sign_data.yaml")
# 签到兑换记录
SIGN_EXCHANGED = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "sign_exchanged.yaml")
# 签到日历
SIGN_CALENDAR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "sign_calendar.yaml")
#搜索首页-热门搜索 #搜索首页-热门搜索
KEYWORDS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "search_request.yaml") KEYWORDS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "search_request.yaml")
KEYWORDS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/search_data", "keywords.yaml") KEYWORDS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/search_data", "keywords.yaml")
...@@ -230,6 +238,8 @@ SCAN_DIARY_CARDS_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/s ...@@ -230,6 +238,8 @@ SCAN_DIARY_CARDS_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/s
# 测肤质feed流 # 测肤质feed流
SKIN_RECOMMEND_SERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "skin_request.yaml") SKIN_RECOMMEND_SERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "skin_request.yaml")
SKIN_RECOMMEND_SERVICE_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/skin_data", "recommend_service.yaml") SKIN_RECOMMEND_SERVICE_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/skin_data", "recommend_service.yaml")
# 测肤质根据选择获取推荐方案
SKIN_SCHEME_CARD_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/skin_data", "scheme_card.yaml")
# 测肤结果页 / AI变脸结果页 # 测肤结果页 / AI变脸结果页
GMAI_SKIN_NEWREPORT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "gmai_request.yaml") GMAI_SKIN_NEWREPORT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "gmai_request.yaml")
...@@ -246,6 +256,8 @@ GMAI_SIMULATE_CONF_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data ...@@ -246,6 +256,8 @@ GMAI_SIMULATE_CONF_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data
# 模拟双眼皮,发型,美瞳,眉毛下日记推荐(根据标签) # 模拟双眼皮,发型,美瞳,眉毛下日记推荐(根据标签)
EYELIDS_DIARY_CARDS_CONFIG = os.path.join(BASE_DIR,"backend_auto/all_backend_api", "eyelids_request.yaml") EYELIDS_DIARY_CARDS_CONFIG = os.path.join(BASE_DIR,"backend_auto/all_backend_api", "eyelids_request.yaml")
EYELIDS_DIARY_CARDS_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/eyelids_data", "diary_cards.yaml") EYELIDS_DIARY_CARDS_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/eyelids_data", "diary_cards.yaml")
# 模拟双眼皮,发型,美瞳,眉毛,口红下新版本feed推荐(根据标签)
FEED_INDEXAI_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "index_ai.yaml")
# AI变脸结果 # AI变脸结果
GMAI_PLASTIC_ANALYSIS_V3_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/gmai_data", "plastic_analysis_v3.yaml") GMAI_PLASTIC_ANALYSIS_V3_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/gmai_data", "plastic_analysis_v3.yaml")
...@@ -360,6 +372,9 @@ SERVICE_FAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/service_d ...@@ -360,6 +372,9 @@ SERVICE_FAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/service_d
#商祥页-分享 #商祥页-分享
SERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "services_request.yaml") SERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "services_request.yaml")
SERVICES_SHARE_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/services_data", "share_data.yaml") SERVICES_SHARE_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/services_data", "share_data.yaml")
# 美券点击立即使用获取美购列表
SERVICES_V1_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/services_data", "v1.yaml")
#商祥页-加入购物车 #商祥页-加入购物车
SHOPCART_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/shopcart_data", "add.yaml") SHOPCART_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/shopcart_data", "add.yaml")
#商祥页-美券列表 #商祥页-美券列表
...@@ -373,6 +388,8 @@ PRODUCT_COUPON_MY_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/ ...@@ -373,6 +388,8 @@ PRODUCT_COUPON_MY_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/
#商祥页-推荐商品列表 #商祥页-推荐商品列表
HYBRID_PROMOTION_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hybrid_promotion_request.yaml") HYBRID_PROMOTION_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hybrid_promotion_request.yaml")
RELATED_SERVICE_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hybrid_promotion_data", "related_service_data.yaml") RELATED_SERVICE_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hybrid_promotion_data", "related_service_data.yaml")
# 商祥页-推荐商品列表-新接口-748以上
SERVICE_PROMOTION_RELATED_SERVICE_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "service_promotion_related_service_data.yaml")
#次卡-确认订单 #次卡-确认订单
BEAUTY_CARD_ORDER_CONFIRM = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_order_confirm.yaml") BEAUTY_CARD_ORDER_CONFIRM = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_order_confirm.yaml")
...@@ -547,6 +564,21 @@ SETTLEMENTDELETE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/settle ...@@ -547,6 +564,21 @@ SETTLEMENTDELETE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/settle
OMLOGIN_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_om_api", "login_request.yaml") OMLOGIN_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_om_api", "login_request.yaml")
OMLOGIN = os.path.join(BASE_DIR, "backend_auto/test_om_data/om_login_data", "om_login.yaml") OMLOGIN = os.path.join(BASE_DIR, "backend_auto/test_om_data/om_login_data", "om_login.yaml")
#OM后台-自定义专题搜索
SPECIAL_LIST = os.path.join(BASE_DIR, "backend_auto/test_om_data/achelous_data", "special_list.yaml")
#OM后台-自定义专题创建
SPECIAL_EDIT = os.path.join(BASE_DIR, "backend_auto/test_om_data/achelous_data", "special_edit.yaml")
#OM后台-自定义专题删除
SPECIAL_DELETE = os.path.join(BASE_DIR, "backend_auto/test_om_data/achelous_data", "special_delete.yaml")
#OM后台-自定义专题组件库创建保存/更新保存
PAGE_EDIT = os.path.join(BASE_DIR, "backend_auto/test_om_data/achelous_data", "page_edit.yaml")
#OM后台-自定义专题组件创建保存/更新保存
UNIT_UPDATE = os.path.join(BASE_DIR, "backend_auto/test_om_data/achelous_data", "unit_update.yaml")
#更美次卡-获取已添加页面次卡spu/sku列表 #更美次卡-获取已添加页面次卡spu/sku列表
GET_RELATED_BC_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_om_api", "beautycard_request.yaml") GET_RELATED_BC_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_om_api", "beautycard_request.yaml")
GET_RELATED_BC = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_data", "get_related_bc.yaml") GET_RELATED_BC = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_data", "get_related_bc.yaml")
...@@ -629,6 +661,10 @@ SEARCHGIFTS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_ ...@@ -629,6 +661,10 @@ 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_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") 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_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") POP_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "pop_service.yaml")
...@@ -665,6 +701,14 @@ LEAVE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "leav ...@@ -665,6 +701,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_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") 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_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") MARK_LIVE_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "mark_live_service.yaml")
......
...@@ -8,13 +8,15 @@ from all_backend_api.diary_request import diary_request ...@@ -8,13 +8,15 @@ from all_backend_api.diary_request import diary_request
class TestDiaryOperation: class TestDiaryOperation:
data = BaseRequest().api_load(path_setting.DIARY_OPERATION) data = BaseRequest().api_load(path_setting.DIARY_OPERATION)
diary_operation_case, diary_operation_data = get_ids(data, "diary_operation") diary_operation_case, diary_operation_data = get_ids(data, "diary_additional_info")
@pytest.mark.parametrize("param", diary_operation_data, ids=diary_operation_case) @pytest.mark.parametrize("param", diary_operation_data, ids=diary_operation_case)
def test_diary_operation(self, param): def test_diary_operation(self, param):
r = diary_request().diary_operation(param["diary_id"], param["title"], param["operation_timestamp"], param["doctor_name"], param["hospital_name"]) r = diary_request().diary_additional_info(param["diary_id"], param["title"], param["operation_timestamp"], param["doctor_name"], param["hospital_name"])
result = diary_request().diary_additional_info() result = diary_request().diary_operation()
if result["error"] == 1: assert r["error"] == param["assert1"]
assert r["message"] == param["assert"] assert result["error"] == param["assert1"]
# if result["error"] == 1:
# assert r["message"] == param["assert"]
# if r["error"] == 1: # if r["error"] == 1:
# assert r["message"] ==param["assert2"] # assert r["message"] ==param["assert2"]
......
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.feed_request import feed_request
class TestIndexAi:
data = BaseRequest().api_load(path_setting.FEED_INDEXAI_DATA)
indexai_case, indexai_data = get_ids(data, "index_ai")
@pytest.mark.skip("跳过,目前测试环境数据较少")
@pytest.mark.parametrize("param", indexai_data, ids=indexai_case)
def test_index_ai(self, param):
r = feed_request().index_ai(param["tag_names"], param["scan_type"], param["offset"], param["current_city_id"])
if r["error"] == 0:
offset = r["data"]["offset"]
assert offset == 14
features = r["data"]["features"]
assert len(features) == 12
i = 0
# 目前临时方案,一半商业流量,一半自然流量
for index in features:
print(index["card_type"])
if i%2 == 0: assert index["card_type"] in (0, 19, 9)
else: assert index["card_type"] == 43
i += 1
...@@ -16,7 +16,7 @@ class TestProductDetail: ...@@ -16,7 +16,7 @@ class TestProductDetail:
if r["error"] == 0: if r["error"] == 0:
assert r["error"] == param["assert_error"] assert r["error"] == param["assert_error"]
assert r["data"]["service_hospital"]["services"] != param["assert_service_hospital"]
if r["error"] == 1: if r["error"] == 1:
assert r["message"] == param["assert_spu_message"] assert r["message"] == param["assert_spu_message"]
# if r["error"] == -1:
# assert r["message"] == param["assert_version_message"]
import pytest
from all_backend_api.janus_request import janus_request
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
class TestServicePromotionRelatedServiceData:
data = BaseRequest().api_load(path_setting.SERVICE_PROMOTION_RELATED_SERVICE_DATA)
service_promotion_related_service_data_case, service_promotion_related_service_data_data = \
get_ids(data, "service_promotion_related_service_data")
@pytest.mark.parametrize("param", service_promotion_related_service_data_data,
ids=service_promotion_related_service_data_case)
def test_service_promotion_related_service_data_case(self, param):
r = janus_request().service_promotion_related_service_data(param["service_id"], param["page"],
param["current_city_id"])
if param["page"] == 1:
assert len(r["data"]["services"]) == param["assert_page1_len"]
if param["page"] == 2:
assert len(r["data"]["services"]) == param["assert_page2_len"]
if r["error"] == 0:
assert r["data"]["services"][0]["title"] is not None
assert r["data"]["services"][0]["price_info"] is not None
assert r["data"]["services"][0]["sell_num_desc"] is not None
assert r["data"]["services"][0]["doctor_hospital_name"] is not None
assert r["data"]["services"][0]["distance"] is not 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
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 all_backend_api.services_request import services_request
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
class TestV1:
data = BaseRequest().api_load(path_setting.SERVICES_V1_DATA)
v1_case, v1_data = get_ids(data, "v1")
@pytest.mark.parametrize("param", v1_data, ids=v1_case)
def test_share_data(self, param):
r = services_request().v1(param["coupon_info_id"], param["order_by"])
if r["error"] == 0:
assert len(r["data"]) > 0
print(r)
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.skin_request import skin_request
# 测肤底根据选项获取推荐方案
class TestSkinSchemeCard:
data = BaseRequest().api_load(path_setting.SKIN_SCHEME_CARD_DATA)
skin_scheme_card_case, skin_scheme_card_data = get_ids(data, "scheme_card")
@pytest.mark.parametrize("param", skin_scheme_card_data, ids=skin_scheme_card_case)
def test_scheme_card(self,param):
r = skin_request().skin_scheme_card(param["scene_id"], param["target_id"], param["recover_time_id"])
if r["error"] == 0:
# 推荐美购卡片下面文案部分
title = r["data"]["title"]
content = r["data"]["content"]
assert title == param["title"]
assert content == param["content"]
# 用户选择目标
scene_name = r["data"]["scene_name"]
target_name = r["data"]["target_name"]
recover_time_name = r["data"]["recover_time_name"]
assert scene_name == param["scene_name"]
assert target_name == param["target_name"]
assert recover_time_name == param["recover_time_name"]
# 推荐美购卡片信息
original_price = r["data"]["service_card"]["original_price"]
gengmei_price = r["data"]["service_card"]["gengmei_price"]
assert original_price not in (None, "")
assert gengmei_price not in (None, "")
service_id = r["data"]["service_card"]["service_id"]
service_name = r["data"]["service_card"]["service_name"]
assert service_name not in (None, "")
image_header = r["data"]["service_card"]["image_header"]
assert image_header not in (None, "")
# import requests
# resp = requests.get(url=image_header, verify=False)
# print(resp.text)
# # 判断返回是否有报错信息,否则是一张图片
# assert "errcode" not in resp.text, f'测颜值返回二维码图片不可用'
gm_url = r["data"]["service_card"]["gm_url"]
assert gm_url == "gengmei://service?service_id={}&sign_points=20&has_task=0&transparent_key=rm_r63bkpbh_0&sign_task_seconds=10".format(service_id)
\ 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.user_request import user_request
class TestBaseSignData:
data = BaseRequest().api_load(path_setting.SIGN)
base_sign_data_case, base_sign_data_data = get_ids(data, "base_sign_data")
@pytest.mark.parametrize("param", base_sign_data_data, ids=base_sign_data_case)
def test_favors_diaries(self, param):
r = user_request().base_sign_data()
assert r["error"] == param["assert"]
# 校验字段是否存在
# print(r["data"])
assert r["data"]["wait_time"] is not None and r["data"]["wait_time"] is not "" # 是否关注
assert r["data"]["new_user"] is not None and r["data"]["new_user"] is not "" # 是否关注
assert r["data"]["sign_status"] is not None and r["data"]["sign_status"] is not "" # 是否关注
assert r["data"]["user_id"] is not None and r["data"]["user_id"] is not "" # 是否关注
assert r["data"]["days_to_gift"] is not None and r["data"]["days_to_gift"] is not "" # 是否关注
# assert r["data"] is True
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 TestSignCalendar:
data = BaseRequest().api_load(path_setting.SIGN_CALENDAR)
sign_calendar_case, sign_calendar_data = get_ids(data, "sign_calendar")
@pytest.mark.parametrize("param", sign_calendar_data, ids=sign_calendar_case)
def test_favors_diaries(self, param):
r = user_request().sign_calendar()
assert r["error"] == param["assert"]
assert r["data"]["user_id"] is not None and r["data"]["user_id"] is not "" # 判断用户名是否为空
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 TestSignExchanged:
data = BaseRequest().api_load(path_setting.SIGN_EXCHANGED)
sign_exchanged_case, sign_exchanged_data = get_ids(data, "sign_exchanged")
@pytest.mark.parametrize("param", sign_exchanged_data, ids=sign_exchanged_case)
def test_favors_diaries(self, param):
r = user_request().sign_exchanged()
assert r["error"] == param["assert"]
# 校验字段是否存在
# assert r["data"] is True
diary_operation: diary_additional_info:
#修改日记本信息case-- #修改日记本信息case--
- -
case: "修改信息" case: "修改信息"
...@@ -8,6 +8,7 @@ diary_operation: ...@@ -8,6 +8,7 @@ diary_operation:
doctor_name: "也一样" doctor_name: "也一样"
hospital_name: "一样一样" hospital_name: "一样一样"
assert: "没有权限" assert: "没有权限"
assert1: 0
- -
...@@ -18,6 +19,7 @@ diary_operation: ...@@ -18,6 +19,7 @@ diary_operation:
doctor_name: "测试" doctor_name: "测试"
hospital_name: "测试" hospital_name: "测试"
assert: "没有权限" assert: "没有权限"
assert1: 0
......
index_ai:
-
case: "模拟双眼皮,新版本feed流"
tag_names: '["埋线双眼皮","定点双眼皮","切开双眼皮"]'
scan_type: 6
offset: 2
current_city_id: "beijing"
...@@ -5,12 +5,22 @@ product_detail: ...@@ -5,12 +5,22 @@ product_detail:
service_item_id: "618788" service_item_id: "618788"
version: "7.43.0" version: "7.43.0"
assert_error: 0 assert_error: 0
assert_service_hospital: ""
-
case: "校验本院推荐返回不为空case"
service_id: "585726"
service_item_id: "618788"
version: "7.43.0"
assert_error: 0
assert_service_hospital: ""
assert_spu_message: "美购不存在"
- -
case: "校验spu_id错误case" case: "校验spu_id错误case"
service_id: "585726" service_id: "585726"
service_item_id: "618788" service_item_id: "618788"
version: "7.43.0" version: "7.43.0"
assert_spu_message: "美购不存在" assert_spu_message: "美购不存在"
# - # -
# case: "校验sku_id错误case" # case: "校验sku_id错误case"
# service_id: "5857263" # service_id: "5857263"
......
service_promotion_related_service_data:
-
case: "校验第一页返回数据2条case"
service_id: "5828374"
page: 1
current_city_id: "beijing"
assert_page1_len: 2
-
case: "校验第二页返回数据10条case"
service_id: "5828374"
page: 2
current_city_id: "beijing"
assert_page2_len: 10
-
case: "校验必要字段接口返回不为空"
service_id: "5828374"
page: 2
current_city_id: "beijing"
assert_page1_len: 2
assert_page2_len: 10
\ 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
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
v1:
-
case: "美券立即使用获取美购列表接口"
coupon_info_id: 32366785
order_by: 0
\ No newline at end of file
scheme_card:
-
case: "测肤质根据用户选择获取方案"
scene_id: 1
target_id: 1
recover_time_id: 1
title: "让你无法拒绝的无针水光"
content: "最近的工作不堪负荷,特别疲累,皮肤有些崩溃了,脸上开始有些干燥起皮,肤色也暗沉了不少。无针水光是我最爱的急救提亮肤色项目,整个项目不到20分钟,效果比补水面膜好太多,通过高气压把玻尿酸精华喷射在皮肤,做完皮肤像喝饱水充满了能量,肤色变亮且通透有光泽。"
scene_name: "约会"
target_name: "美白提亮"
recover_time_name: "立刻马上"
\ No newline at end of file
...@@ -3,7 +3,7 @@ reply_create: ...@@ -3,7 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变' beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验 case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan channel: benzhan
content: ces测试+2021-07-30 15:42:50 content: ces测试+2021-08-13 15:36:32
message: 请勿回复重复内容 message: 请勿回复重复内容
message1: 回复成功 message1: 回复成功
message2: 你的回复有点频繁,稍后再来 message2: 你的回复有点频繁,稍后再来
......
base_sign_data:
#签到基础信息
- case: "签到基础信息"
assert: 0
\ No newline at end of file
sign_calendar:
#签到日历
- case: "签到日历"
assert: 0
\ No newline at end of file
sign_exchanged:
#签到奖品兑换记录
- case: "签到奖品兑换记录"
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 TestPageEdit:
data = BaseRequest().api_load(path_setting.PAGE_EDIT)
page_edit_case, page_edit_data = get_ids(data,'page_edit')
@pytest.mark.parametrize("param", page_edit_data, ids=page_edit_case)
def test_page_edit(self, param):
edit = achelous_request().special_edit("32244157", "aha自定义专题创建", "0", "2021-08-01 00:00:00","2021-09-30 00:00:00", "1", "啊哈自定义专题创建标题", "啊哈自定义专题创建分享语","https://heras.igengmei.com/4d5eef0a-78dd-43b3-98b7-137d2341f106-1628565831259")
list = achelous_request().special_list('1', '10', '', '', '', '', '', '1', '0', '', '')
param['visualpage_id'] = list['data']['info_list'][0]['page_id']
param['name'] = edit['data']['name']
r = achelous_request().page_edit(param['visualpage_id'], param['name'], param['visual_info'])
if r['msg'] == 'success':
assert r['data']['visualgroup_id'] == param['assert']
print('自定义专题组件库成功保存,啦啦啦')
else:
assert r['code'] == param['assert_error']
print('自定义专题组件库保存失败,呜呜呜')
\ 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 TestSpecialDelete:
data = BaseRequest().api_load(path_setting.SPECIAL_DELETE)
special_delete_case, special_delete_data = get_ids(data, "special_delete")
@pytest.mark.parametrize("param", special_delete_data, ids=special_delete_case)
def test_special_delete(self, param):
edit = achelous_request().special_edit("32244157","aha自定义专题创建","0","2021-08-01 00:00:00","2021-09-30 00:00:00","1","啊哈自定义专题创建标题","啊哈自定义专题创建分享语","https://heras.igengmei.com/4d5eef0a-78dd-43b3-98b7-137d2341f106-1628565831259")
param['ids'] = edit['data']['id']
r = achelous_request().special_delete(param['ids'])
if r['message'] == 'success':
print("自定义专题删除了")
else:
print("自定义专题无法删除")
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 TestSpecialEdit:
data = BaseRequest().api_load(path_setting.SPECIAL_EDIT)
special_edit_case, special_edit_data = get_ids(data, "special_edit")
@pytest.mark.parametrize("param", special_edit_data, ids=special_edit_case)
def test_special_edit(self, param):
r = achelous_request().special_edit(param['user_id'], param['name'], param['id'], param['start_time'], param['end_time'], param['is_online'], param['share_title'], param['share_content'], param['share_pic'])
if r['message'] == 'success':
assert r["data"]["name"] == param["assert"]
print("自定义专题创建成功~")
else:
assert r['code'] == param['assert_error']
print("自定义专题创建失败,呜呜呜")
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 TestSpecialList:
data = BaseRequest().api_load(path_setting.SPECIAL_LIST)
special_list_case, special_list_data = get_ids(data, 'special_list')
@pytest.mark.parametrize("param", special_list_data, ids= special_list_case)
def test_special_list(self,param):
r = achelous_request().special_list(param['page_index'], param['page_capacity'], param['page_id'], param['name'], param['creator_name'], param['create_time_gt'], param['create_time_lt'], param['is_online'], param['status'], param['start_time'], param['end_time'])
if r['msg'] == 'success':
assert r['data']['page_index'] == param['assert']
print('搜索自定义专题成功啦~~~')
else:
assert r['code'] == param['assert_error']
print('自定义专题搜索失败了!!!')
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 TestUnitUpdate:
data = BaseRequest().api_load(path_setting.UNIT_UPDATE)
unit_update_case, unit_update_data = get_ids(data, "unit_update")
@pytest.mark.parametrize("param", unit_update_data, ids=unit_update_case)
def test_unit_update(self, param):
edit = achelous_request().special_edit("32244157","aha自定义专题创建","0","2021-08-01 00:00:00","2021-09-30 00:00:00","1","啊哈自定义专题创建标题","啊哈自定义专题创建分享语","https://heras.igengmei.com/4d5eef0a-78dd-43b3-98b7-137d2341f106-1628565831259")
list = achelous_request().special_list('1', '10', '', '', '', '', '', '1', '0', '', '')
param['page_id'] = list['data']['info_list'][0]['page_id']
param['name'] = edit['data']['name']
r = achelous_request().unit_update(param['page_id'], param['order'], param['unit'])
if r['msg'] == 'success':
assert r['data']['unit']['module_name'] == param['assert']
print('组件成功保存啦,啦啦啦')
else:
assert r['code'] == param['assert_error']
print('组件保存失败了,呜呜呜')
#调用组件库保存接口
achelous_request().page_edit("param['page_id']", "param['name']", "r['data']['unit']")
...@@ -14,7 +14,7 @@ class TestDeleteRelatedBc: ...@@ -14,7 +14,7 @@ class TestDeleteRelatedBc:
def test_delete_related_bc(self,param): def test_delete_related_bc(self,param):
r = beautycard_request().delete_related_bc(param["unit_id"], param["bc_sku_ids"], param["bc_spu_ids"], param["related_type"]) r = beautycard_request().delete_related_bc(param["unit_id"], param["bc_sku_ids"], param["bc_spu_ids"], param["related_type"])
if r["code"] == 0: if r["code"] == 0:
print("成功删除已添加页面次卡")
assert r["data"] == param["assert"] assert r["data"] == param["assert"]
print("成功删除已添加页面次卡")
if r["code"] == 1: if r["code"] == 1:
print("未删除已添加页面次卡") print("未删除已添加页面次卡")
\ No newline at end of file
#OM后台-组件库创建保存/更新保存
page_edit:
#空组件库保存成功了
-
case: '空组件库保存成功了'
visualpage_id: ''#此字段为自定义专题的专题ID,取自自定义专题搜索接口的返参:page_id
name: ''#此字段取值无用
visual_info: '[]'
assert: 0
assert_error: 999
#OM后台-自定义专题删除
special_delete:
#自定义专题成功删除
-
case: '自定义专题成功删除'
ids: ''#该字段取值用不到
\ No newline at end of file
#OM后台-自定义专题创建
special_edit:
#成功创建自定义专题~
-
case: "成功创建自定义专题~"
user_id: '32244157'
name: aha创建自定义专题
id: 0
start_time: '2021-08-10 00:00:00'
end_time: '2022-08-10 00:00:00'
is_online: 1
share_title: 啊哈创建自定义专题分享标题
share_content: 啊哈创建自定义专题分享文案
share_pic: https://heras.igengmei.com/4d5eef0a-78dd-43b3-98b7-137d2341f106-1628565831259
assert: aha创建自定义专题
assert_error: 999
#OM后台-自定义专题搜索
special_list:
#自定义专题-无条件-搜索
-
case: '自定义专题-无条件-搜索'
page_index: 1
page_capacity: 10
page_id: ''
name: ''
creator_name: ''
create_time_gt: ''
create_time_lt: ''
is_online: 1
status: 0
start_time: ''
end_time: ''
assert: 1
aseert_error: 999
\ No newline at end of file
#OM后台-自定义专题组件创建保存/更新保存
unit_update:
#平滑式轮播图组件新增保存成功
-
case: '平滑式轮播图组件新增保存成功'
page_id: ''#此字段为自定义专题的专题ID,取自自定义专题搜索接口的返参:page_id
order: '0'
unit: '{"component_type":1,"module_name":"啊哈-平滑式轮播图","template_type":1,"images":[{"url":"https://heras.igengmei.com/105a2aa3-71a2-4e21-80b6-2de26da017ed-1628672528151","link_type":"45","link_id":"888","width":500,"height":313}],"component_style":{"background_image":{"url":"","width":0,"height":0}},"links":[{"url":"https://heras.igengmei.com/105a2aa3-71a2-4e21-80b6-2de26da017ed-1628672528151","link_type":"45","link_id":"888","width":500,"height":313}],"hash":"c2e1c300fa8211ebbe29738d54d50408"}'
assert: 啊哈-平滑式轮播图
assert_error: 999
#堆叠式轮播图组件新增保存成功
-
case: '堆叠式轮播图组件新增保存成功'
page_id: ''#此字段为自定义专题的专题ID,取自自定义专题搜索接口的返参:page_id
order: '0'
unit: '{"component_type":1,"module_name":"啊哈-堆叠式轮播图","template_type":2,"images":[{"url":"https://heras.igengmei.com/105a2aa3-71a2-4e21-80b6-2de26da017ed-1628672528151","link_type":"45","link_id":"888","width":500,"height":313}],"component_style":{"background_image":{"url":"","width":0,"height":0}},"links":[{"url":"https://heras.igengmei.com/105a2aa3-71a2-4e21-80b6-2de26da017ed-1628672528151","link_type":"45","link_id":"888","width":500,"height":313}],"hash":"c2e1c300fa8211ebbe29738d54d50408"}'
assert: 啊哈-堆叠式轮播图
assert_error: 999
\ No newline at end of file
...@@ -3,7 +3,7 @@ check_sku_ids: ...@@ -3,7 +3,7 @@ check_sku_ids:
#按SKU导入-导入单条数据,导入成功 #按SKU导入-导入单条数据,导入成功
- -
case : "按SKU导入-导入单条数据,导入成功" case : "按SKU导入-导入单条数据,导入成功"
sku_ids : '[{"import_id":"10066","rank":0,"row":1}]' sku_ids : '[{"import_id":"10252","rank":0,"row":1}]'
assert : '' assert : ''
#按SKU导入-导入单条数据,ID不存在 #按SKU导入-导入单条数据,ID不存在
......
...@@ -48,7 +48,7 @@ get_related_bc: ...@@ -48,7 +48,7 @@ get_related_bc:
bc_spu_id : "" bc_spu_id : ""
page : "0" page : "0"
page_size : "10" page_size : "10"
assert: 0 assert: None
#按SKU导入-根据专题和次卡spu_id、sku_id获取已添加页面次卡spu和sku列表 #按SKU导入-根据专题和次卡spu_id、sku_id获取已添加页面次卡spu和sku列表
- -
...@@ -58,7 +58,7 @@ get_related_bc: ...@@ -58,7 +58,7 @@ get_related_bc:
bc_spu_id : "100023" bc_spu_id : "100023"
page : "0" page : "0"
page_size : "10" page_size : "10"
assert: 0 assert: None
#按SPU导入-录入错误的spu_id,点击查询 #按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