Commit 6ac191a0 authored by aha's avatar aha

merge common_dev

parents ced6a741 b499cb4e
......@@ -15,16 +15,16 @@ class diary_request(BaseRequest):
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["title"] = title
self.params["operation_timestamp"] = operation_timestamp
self.params["doctor_name"] = doctor_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"])
# 详情页-内容
......
......@@ -18,7 +18,7 @@ cancelfavor:
#
#日记本修改信息
operation:
additional_info:
method: post
url: /api/diary/additional_info/v2
params:
......@@ -34,8 +34,8 @@ operation:
#查看日记修改信息页面
additional_info:
# 查看日记修改信息页面
operation:
method: get
url: /api/diary/operation/17586147/
params:
......
......@@ -3,6 +3,7 @@ services:
method: get
url: /api/doctor_v2/5bd9f05cad51403d853ba8c881989e23/services
params:
device_id: B3248423-2EA5-495B-D3CA-AFB8F99417EC
offset: 0
show_tag_distro: 1
tag_id: all
......
......@@ -10,10 +10,11 @@ class feed_request(BaseRequest):
self.data = self.api_load(path_setting.FREE_RECRUIT_BANNER_CONFIG)
def index_v9(self,tabtype,version,current_city_id):
def index_v9(self,tabtype,version,current_city_id,tab_id='0'):
self.params["tabtype"] = tabtype
self.params["version"] = version
self.params["current_city_id"] = current_city_id
self.params["tab_id"] = tab_id
return self.api_send(self.data["index_v9"])
......@@ -70,24 +71,39 @@ class feed_request(BaseRequest):
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__':
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"))
return self.api_send(self.data["index_ai"])
# 免费招募活动详情
print(feed_request().free_recruit_detail("beijing", "43"))
# 免费招募获取用户状态
print(feed_request().user_status("beijing", "43"))
# 免费招募查看中奖名单
print(feed_request().winning_user_lis("44", " "))
\ No newline at end of file
if __name__ == '__main__':
# 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"))
#
# # 免费招募获取用户状态
# 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
......@@ -5,6 +5,7 @@ index_v9:
tabtype: ${tabtype}
version: ${version}
current_city_id: ${current_city_id}
tab_id: ${tab_id}
data:
json: {}
isLogin: 1
......@@ -88,4 +89,14 @@ winning_user_lis:
json: ${json}
data:
json: { }
isLogin: 1
\ No newline at end of file
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
......@@ -8,7 +8,6 @@ class filter_request(BaseRequest):
self.data = self.api_load(path_setting.FILTER_CONFIG)
def service_home_city_v2(self, current_city_id, lat, lng):
print("fgx")
self.params["current_city_id"] = current_city_id
self.params["lat"] = lat
self.params["lng"] = lng
......@@ -16,8 +15,7 @@ class filter_request(BaseRequest):
if __name__ == '__main__':
#城市筛选器
# 城市筛选器
print(filter_request().service_home_city_v2("", "40.002", "116.487252"))
print("fgx")
......@@ -3,6 +3,7 @@ services:
method: get
url: /api/hospitals_v2/bjxyjcpfbyy/services
params:
device_id: B3248423-2EA5-495B-D3CA-AFB8F99417EC
offset: 0
show_tag_distro: 1
tag_id: "all"
......
......@@ -7,12 +7,14 @@ class im_request(BaseRequest):
self.data = self.api_load(path_setting.CONVERSATION_DETAIL_CONFIG)
def conversation_detail(self, current_city_id, begin_msg_id, conversation_type, end_msg_id,referrer):
#咨询师聊天详情页
self.params["current_city_id"] = current_city_id
self.params["begin_msg_id"] = begin_msg_id
self.params["conversation_type"] = conversation_type
self.params["end_msg_id"] = end_msg_id
self.params["referrer"] = referrer
return self.api_send(self.data["conversation_detail"])
#该接口已下线
def auto_msg(self, trace_id, conversation_id):
self.params["trace_id"] = trace_id
......@@ -20,6 +22,7 @@ class im_request(BaseRequest):
return self.api_send(self.data["auto_msg"])
def send_msg(self, conversation_id, is_system, referrer, referrer_id, msg_type, content, extra):
#给咨询师发送消息
self.params["conversation_id"] = conversation_id
self.params["is_system"] = is_system
self.params["referrer"] = referrer
......@@ -28,13 +31,31 @@ class im_request(BaseRequest):
self.params["content"] = content
self.params["extra"] = extra
return self.api_send(self.data["send_msg"])
# 该接口已下线
def robot_get_second(self, page_type):
" 获取页面触发私信时间 "
self.params["page_type"] = page_type
return self.api_send(self.data["robot_get_second"])
def robot_send_msg(self, hospital_id, is_system, page_type, req_source, target_user_id, version):
#给用户发私信
self.params["hospital_id"] = hospital_id
self.params["is_system"] = is_system
self.params["page_type"] = page_type
self.params["req_source"] = req_source
self.params["target_user_id"] = target_user_id
self.params["version"] = version
return self.api_send(self.data["robot_send_msg"])
if __name__ == '__main__':
print(im_request().conversation_detail("beijing", 0, 4, 0, "message_home"))
print("第二个接口")
#print(im_request().conversation_detail("beijing", 0, 4, 0, "message_home"))
print(im_request().auto_msg("2021/04/22/1722/70a1791606d5",368))
print("send_msg")
print(im_request().send_msg("368", 0, "message_home", "", 0, "您好,我想咨询一下", {}))
#print("send_msg")
#print(im_request().send_msg("368", 0, "message_home", "", 0, "您好,我想咨询一下", {}))
print(im_request().robot_get_second("3"))
print(im_request().robot_send_msg("715368769fea4a1ba0c85979112ed154", 1, "3", "gengmei", 33909952, "7.46.0"))
......
......@@ -39,4 +39,28 @@ send_msg:
extra: ${extra}
json: {}
isLogin: 1 #需要登录的接口
robot_get_second:
method: get
url: /api/im/robot/get_second
params:
page_type: ${page_type}
data: {}
json: {}
isLogin: 1 #需要登录的接口
robot_send_msg:
method: post
url: /api/im/robot/send_msg
params:
version: ${version}
data:
hospital_id: ${hospital_id}
is_system: ${is_system}
page_type: ${page_type}
req_source: ${req_source}
target_user_id: ${target_user_id}
json: {}
isLogin: 1 #需要登录的接口
\ No newline at end of file
......@@ -94,6 +94,13 @@ class janus_request(BaseRequest):
self.params["tab_id"] = tab_id
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):
print("fgx")
......@@ -322,33 +329,33 @@ if __name__ == '__main__':
#打印购物车-猜你喜欢列表接口返回
# print(janus_request().mine_guess_you_like())
#打印商祥页-详情接口返回
print(janus_request().product_detail("5857263", "618788", "7.43.0"))
#打印商祥页-sku信息接口返回
print(janus_request().sku_info("5857263", "618788"))
#打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回
print(janus_request().product_coupon_my_list(0, 0))
#品类聚合页面商品列表接口返回
# print(janus_request().tag_service())
print("fgx")
#品类聚合页面标签和专场
# print(janus_request().polymer())
print("fgx")
#打印次卡-确认订单接口返回
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_order_submit("12345678912", "10176", 1, 1, 0, 0))
#打印次卡-支付平台接口返回
print(janus_request().beauty_card_payment_method("101670448736595"))
print(janus_request().product_my_list(0, 0))
# 次卡商详页-适应机构
print(janus_request().beauty_card_service_hospital("10046", 20, 0, 1))
# print(janus_request().product_detail("5857263", "618788", "7.43.0"))
# #打印商祥页-sku信息接口返回
# print(janus_request().sku_info("5857263", "618788"))
# #打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回
# print(janus_request().product_coupon_my_list(0, 0))
#
# #品类聚合页面商品列表接口返回
# # print(janus_request().tag_service())
# print("fgx")
#
# #品类聚合页面标签和专场
# # print(janus_request().polymer())
# print("fgx")
#
# #打印次卡-确认订单接口返回
# 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_order_submit("12345678912", "10176", 1, 1, 0, 0))
# #打印次卡-支付平台接口返回
# print(janus_request().beauty_card_payment_method("101670448736595"))
#
# print(janus_request().product_my_list(0, 0))
#
# # 次卡商详页-适应机构
# print(janus_request().beauty_card_service_hospital("10046", 20, 0, 1))
# #打印购物车-猜你喜欢列表接口返回
# print(janus_request().mine_guess_you_like())
# #打印商祥页-详情接口返回
......@@ -405,3 +412,5 @@ if __name__ == '__main__':
#项目榜单主页
print(janus_request().project_rank("143", "748.0", "beijing"))
# 商祥页-推荐商品-新接口
print(janus_request().service_promotion_related_service_data('5828374', 1, 'beijing'))
......@@ -71,6 +71,21 @@ product_coupon_my_list:
json: {}
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:
method: GET
......@@ -79,7 +94,6 @@ tag_service:
size: ${size}
tag_ids: ${tag_ids}
offset: ${offset}
tag_id: ${tag_id}
version: ${version}
device_id: ${device_id}
data: { }
......
......@@ -13,7 +13,13 @@ class services_request(BaseRequest):
self.params["u_id"] = u_id
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["v1"])
if __name__ == '__main__':
#打印商祥页-分享接口返回
print(services_request().share_data("5857263", "618788"))
\ No newline at end of file
print(services_request().share_data("5857263", "618788"))
# print(services_request().v1(32366785, 0))
\ No newline at end of file
......@@ -6,4 +6,13 @@ share_data:
p_id: ${p_id}
u_id: ${u_id}
data: {}
json: {}
\ No newline at end of file
json: {}
#获取美购列表,美券
v1:
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):
self.params["device_id"] = device_id
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__':
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))
......@@ -6,4 +6,12 @@ skin_recommend_service:
offset: ${offset}
size: ${size}
appeal_tag_ids: ${appeal_tag_ids}
device_id: ${device_id}
\ No newline at end of file
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
......@@ -148,9 +148,27 @@ class user_request(BaseRequest):
return self.api_send(self.data["favors_answers"])
#忘记密码-设置密码
def change_pwd(self,version, change_type,new_password, repeat_password):
self.params["version"] = version
self.params["change_type"] = change_type
self.params["new_password"] = new_password
self.params["repeat_password"] = repeat_password
return self.api_send(self.data["change_pwd"])
# 修改密码
def change_pwdd(self, version, change_type, password, new_password, repeat_password):
self.params["version"] = version
self.params["change_type"] = change_type
self.params["password"] = password
self.params["new_password"] = new_password
self.params["repeat_password"] = repeat_password
return self.api_send(self.data["change_pwdd"])
#点击修改密码时获取用户信息
def check_pwd(self):
return self.api_send(self.data["check_pwd"])
if __name__ == '__main__':
#个人中心
......@@ -188,6 +206,15 @@ if __name__ == '__main__':
# 我的-收藏-日记贴
print(user_request().favors_topics(0, 10))
#忘记密码-修改密码
print(user_request().change_pwd('7.48.0',1,123456,123456))
#修改密码
print(user_request().change_pwdd('7.48.0',123456,1,123456,123456))
#修改密码时获取账号信息
print(user_request().check_pwd())
......@@ -210,3 +210,39 @@ favors_answers:
data: {}
json: {}
isLogin: 1
#忘记密码-设置密码
change_pwd:
method: post
url: /api/user/change_pwd
params:
version: ${version}
data:
change_type: ${change_type}
new_password: ${new_password}
repeat_password: ${repeat_password}
json: {}
isLogin: 1
#修改密码
change_pwdd:
method: post
url: /api/user/change_pwd
params:
version: ${version}
data:
password: ${password}
change_type: ${change_type}
new_password: ${new_password}
repeat_password: ${repeat_password}
json: {}
isLogin: 1
#修改密码时获取用户信息
check_pwd:
method: get
url: /api/user/check_pwd
params:
data:
json: {}
isLogin: 1
\ No newline at end of file
import path_setting
from in_common.base_request import BaseRequest
#获取验证码
class verification_code_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.VERIFICATION_CODE_REQUEST_CONFIG)
#获取验证码
def verification_code(self, phone,type,verifier):
self.params["phone"] = phone
self.params["type"] = type
self.params["verifier"] = verifier
return self.api_send(self.data["verification_code"])
if __name__ == '__main__':
print(verification_code_request().verification_code(12345678999,2, 'fd94aa08c242a00496aba1e5b556c436'))
\ No newline at end of file
verification_code:
method: post
url: /api/verification_code
params: {}
data:
phone: ${phone}
type: ${type}
verifier: ${verifier}
json: {}
\ No newline at end of file
......@@ -10,7 +10,7 @@ class visual_beauty_card_request(BaseRequest):
self.data = self.api_load(path_setting.BEAUTYCARD_FILTERS_CONFIG)
#自定义专题-更美次卡橱窗组件商品
def visual_beauty_card_services(self, unit_id, current_city_id, page, page_size, version, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
def visual_beauty_card_services(self, unit_id, current_city_id, page, page_size, version):
self.params["unit_id"] = unit_id
self.params["current_city_id"] = current_city_id
self.params["page"] = page
......@@ -20,7 +20,7 @@ class visual_beauty_card_request(BaseRequest):
return self.api_send(self.data['visual_beauty_card_services'])
#自定义专题-更美次卡商品列表筛选器
def beautycard_filters(self, unit_id, current_city_id, version, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
def beautycard_filters(self, unit_id, current_city_id, version):
self.params["unit_id"] = unit_id
self.params["current_city_id"] = current_city_id
self.params["version"] = version
......@@ -28,7 +28,7 @@ class visual_beauty_card_request(BaseRequest):
return self.api_send(self.data['beautycard_filters'])
#自定义专题-更美次卡商品列表组件商品
def beautycard_skus(self, unit_id, tag_id, area, sort_type, page, page_size, version, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
def beautycard_skus(self, unit_id, tag_id, area, sort_type, page, page_size, version):
self.params["unit_id"] = unit_id
self.params["tag_id"] = tag_id
self.params["area"] = area
......@@ -37,4 +37,4 @@ class visual_beauty_card_request(BaseRequest):
self.params["page_size"] = page_size
self.params["version"] = version
return self.api_send(self.data['beautycard_skus'])
\ No newline at end of file
return self.api_send(self.data['beautycard_skus'])
import path_setting
from in_common.base_request import BaseRequest
class visual_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.VISUAL_CONFIG)
# 签到--其他tab 美购feed
def service_list(self, unit_id, current_city_id='beijing'):
self.params["unit_id"] = unit_id
self.params["current_city_id"] = current_city_id
return self.api_send(self.data['service_list'])
\ No newline at end of file
#签到--其他tab 美购feed
service_list:
method: GET
url: /api/visual/service_list
params:
#组件id
unit_id : ${unit_id}
current_city_id : ${current_city_id}
data: {}
json: {}
is_Login: 1
import path_setting
from in_common.base_request import BaseRequest
class web3_request(BaseRequest):
def __init__(self):
self.CONVERSATION_ROBOT = self.api_load(path_setting.CONVERSATION_ROBOT)
def conversation_robot_get_page(self):
#获取页面类型
return self.api_send(self.CONVERSATION_ROBOT["conversation_robot_get_page"])
def conversation_robot_add_message(self, message, csrfmiddlewaretoken):
#添加私信机器人配置
self.params["message"] = message
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
return self.api_send(self.CONVERSATION_ROBOT["conversation_robot_add_message"])
if __name__ == '__main__':
print(web3_request().conversation_robot_get_page())
print(web3_request().conversation_robot_add_message('{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"测试"}]}],"personality":[]}', "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"))
conversation_robot_get_page:
method: get
url: /api/web3/conversation/robot/get_page
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
conversation_robot_add_message:
method: post
url: /api/web3/conversation/robot/add_message
params: {}
data:
message: ${message}
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -15,6 +15,23 @@ class web_request(BaseRequest):
def doctor_submechanisms(self) :
return self.api_send(self.ACCOUNT_URL["doctor_submechanisms"])
# 医生后台-商户管理-医生管理列表
def doctor_doctorlist(self,doctor_type):
self.params["doctor_type"] = doctor_type
return self.api_send(self.ACCOUNT_URL["doctor_doctorlist"])
# 医生后台-商户管理-医生管理列表--创建医生发送验证码
def doctor_verificationcode(self,phone):
self.params["phone"] = phone
return self.api_send(self.ACCOUNT_URL["doctor_verificationcode"])
# 医生后台-商户管理-医生管理列表--创建医生上传头像图片
def file_upload(self,phone):
self.params["phone"] = phone
return self.api_send(self.ACCOUNT_URL["file_upload"])
def service_offline(self,id,csrfmiddlewaretoken):
self.params["id"] = id
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
......
......@@ -217,3 +217,34 @@ cpc_community_promote_flows:
data: {}
json: {}
isLogin: 1 #需要登录
#医生后台-商户管理-医生管理列表
doctor_doctorlist:
method: get
url: /api/web/doctor/doctorlist
params:
doctor_type: ${doctor_type}
data: { }
json: { }
isLogin: 1 #需要登录
#医生后台-商户管理-医生管理列表--创建医生发送验证码
doctor_verificationcode:
method: post
url: /api/web/doctor/verificationcode
params: {}
data:
phone: ${phone}
json: {}
isLogin: 1 #需要登录
#医生后台-商户管理-医生管理列表--创建医生上传头像图片
file_upload:
method: post
url: /api/web/file/upload
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -65,8 +65,49 @@ class achelous_request(BaseRequest):
self.params["unit"] = unit
return self.api_send(self.data["unit_update"])
# OM后台-商业分类管理,后台分类(工业)
def industry_search(self, tag_system_type,tag_id, tag_name, is_online, is_display, is_move, page, size):
self.params["tag_system_type"] = tag_system_type
self.params["tag_id"] = tag_id
self.params["tag_name"] = tag_name
self.params["is_online"] = is_online
self.params["is_display"] = is_display
self.params["is_move"] = is_move
self.params["page"] = page
self.params["size"] = size
return self.api_send(self.data["industry_search"])
# OM后台-商业分类管理,后台分类(工业),标签排序
def category_ordering(self, tag_id, tag_type, tag_system_type, operation_type):
self.params["tag_id"] = tag_id
self.params["tag_type"] = tag_type
self.params["tag_system_type"] = tag_system_type
self.params["operation_type"] = operation_type
return self.api_send(self.data["category_ordering"])
def catalog_add(self, tag_system_type, tag_name, father_tag_id, child_tag_ids, is_online, is_display, is_move):
self.params["tag_system_type"] = tag_system_type
self.params["tag_name"] = tag_name
self.params["father_tag_id"] = father_tag_id
self.params["child_tag_ids"] = child_tag_ids
self.params["is_online"] = is_online
self.params["is_display"] = is_display
self.params["is_move"] = is_move
return self.api_send(self.data["catalog_add"])
def category_export_catalog_datas(self):
return self.api_send(self.data["category_export_catalog_datas"])
if __name__ == "__main__":
# print(achelous_request().batch_add_service("4176", "73809,23508,33823"))
# 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
# print(achelous_request().special_list('1', '10', '', '', '', '', '', '1', '0', '', ''))
# print(achelous_request().industry_search(1,"口腔","all","all","all",1,10))
# print(achelous_request().category_ordering(1002463,1,1,2))
# print(achelous_request().catalog_add(1, "自动化接口测试添加2", 15510, [], "false", "false", "false"))
print(achelous_request().category_export_catalog_datas())
\ No newline at end of file
......@@ -89,4 +89,60 @@ unit_update:
order: ${order}
unit: ${unit}
json: {}
isLogin: 1
#OM后台-商业分类管理,后台分类(工业)
industry_search:
method: GET
url: /achelous/api/industry/search
params:
tag_system_type: ${tag_system_type}
tag_name: ${tag_name}
tag_id: ${tag_id}
is_online: ${is_online}
is_display: ${is_display}
is_move: ${is_move}
page: ${page}
size: ${size}
data: {}
json: {}
isLogin: 1
#OM后台-商业分类管理,后台分类(工业),标签排序
category_ordering:
method: POST
url: /achelous/api/category/ordering
params: {}
data:
tag_id: ${tag_id}
tag_type: ${tag_type}
tag_system_type: ${tag_system_type}
operation_type: ${operation_type}
json: {}
isLogin: 1
#OM后台-商业分类管理,后台分类(工业),添加分类
catalog_add:
method: POST
url: /achelous/api/catalog/add
params: {}
data:
tag_system_type: ${tag_system_type}
tag_name: ${tag_name}
father_tag_id: ${father_tag_id}
child_tag_ids: ${child_tag_ids}
is_online: ${is_online}
is_display: ${is_display}
is_move: ${is_move}
json: {}
isLogin: 1
#OM后台-商业分类管理,邮件导出
category_export_catalog_datas:
method: GET
url: /achelous/api/category/export_catalog_datas
params: {}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
......@@ -157,10 +157,21 @@ SIGN_EXCHANGED = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_dat
SIGN_CALENDAR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "sign_calendar.yaml")
# 签到--其他 tab feed --也是总的 visual 配置项
VISUAL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "visual_request.yaml")
VISUAL_SERVICE_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/visual_data", "service_list.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")
# 医生后台--医生后台-商户管理-医生管理列表
DOCTORLIST = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "doctor_doctorlist.yaml")
# 医生后台-商户管理-医生管理列表--创建医生发送验证码
DOCTOR_VERIIFICATIONCODE = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "doctor_verificationcode.yaml")
#医生后台-我的商品
SERVICE_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "service_list.yaml")
......@@ -239,6 +250,8 @@ SCAN_DIARY_CARDS_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/s
# 测肤质feed流
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_SCHEME_CARD_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/skin_data", "scheme_card.yaml")
# 测肤结果页 / AI变脸结果页
GMAI_SKIN_NEWREPORT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "gmai_request.yaml")
......@@ -255,6 +268,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_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变脸结果
GMAI_PLASTIC_ANALYSIS_V3_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/gmai_data", "plastic_analysis_v3.yaml")
......@@ -272,6 +287,16 @@ ORDERS_MY_V2_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/order
#我的订单-各状态订单数量
ORDER_MY_STATUS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/orders_data", "my_status.yaml")
# OM后台-商业分类管理,后台分类(工业)
ACHELOUS_INDUSTRY_SEARCH_DATA = os.path.join(BASE_DIR, "backend_auto/test_om_data/achelous_data", "industry_search.yaml")
# OM后台-商业分类管理,后台分类(工业)排序
ACHELOUS_CATEGORY_ORDERING_DATA = os.path.join(BASE_DIR, "backend_auto/test_om_data/achelous_data", "category_ordering.yaml")
# OM后台-商业分类管理,后台分类(工业)排序,添加分类
ACHELOUS_CATEGORY_ADD_DATA = os.path.join(BASE_DIR, "backend_auto/test_om_data/achelous_data", "catalog_add.yaml")
LOGIN_PASSWD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/accounts_data", "login_passwd.yaml")
LOGIN_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "accounts_request.yaml")
......@@ -330,6 +355,10 @@ SEND_MSG = os.path.join(BASE_DIR, "backend_auto/test_backend_data/im_data", "sen
#发送消息
PRIVATE_CONVERSATION_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "private_conversation_request.yaml")
PRIVATE_CONVERSATION = os.path.join(BASE_DIR, "backend_auto/test_backend_data/private_conversation_data", "private_conversation.yaml")
#私信机器人-获取页面触发私信时间
ROBOT_GET_SECOND = os.path.join(BASE_DIR, "backend_auto/test_backend_data/im_data", "robot_get_second.yaml")
#私信机器人-给用户发送私信
ROBOT_SEND_MSG = os.path.join(BASE_DIR, "backend_auto/test_backend_data/im_data", "robot_send_msg.yaml")
HOME_V5_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "service_request.yaml")
HOME_V5=os.path.join(BASE_DIR,"backend_auto/test_backend_data/service_data","home_v5.yaml")
......@@ -365,6 +394,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_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")
#商祥页-美券列表
......@@ -378,6 +410,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")
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")
......@@ -468,6 +502,12 @@ CONVERSATIONCOUPON=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_dat
#医生后台-发送私信
CONVERSATIONUSERID=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "conversation_user_id.yaml")
#医生后台-私信机器人
CONVERSATION_ROBOT = os.path.join(BASE_DIR, "backend_auto/all_doctor_api", "web3_request.yaml")
ROBOTGETPAGE= os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web3_data", "conversation_robot_get_page.yaml")
ROBOTADDMESSAGE= os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web3_data", "conversation_robot_add_message.yaml")
#医生后台-服务资源
ADTYPELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "artemis_ad_type_list.yaml")
#医生后台-我的购物车
......@@ -627,7 +667,12 @@ BEAUTY_POST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data"
#直播关注/取关主播
FOLLOW_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "follow_add.yaml")
FOLLOW_DEL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "follow_del.yaml")
#忘记密码-设置密码
CHANGE_PWD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "change_pwd.yaml")
#修改密码
CHANGE_PWDD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "change_pwdd.yaml")
#设置密码时获取用户信息
CHECK_PWD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "check_pwd.yaml")
#主播-推荐袋美购列表展示
LIVESERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
......@@ -798,5 +843,9 @@ POLYMERIZATION_CONTENT = os.path.join(BASE_DIR,"backend_auto/test_backend_data/p
#获取验证码
VERIFICATION_CODE_REQUEST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "verification_code_request.yaml")
VERIFICATION_CODE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/verification_code_data", "verification_code.yaml")
if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG)
\ No newline at end of file
......@@ -8,13 +8,15 @@ from all_backend_api.diary_request import diary_request
class TestDiaryOperation:
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)
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"])
result = diary_request().diary_additional_info()
if result["error"] == 1:
assert r["message"] == param["assert"]
r = diary_request().diary_additional_info(param["diary_id"], param["title"], param["operation_timestamp"], param["doctor_name"], param["hospital_name"])
result = diary_request().diary_operation()
assert r["error"] == param["assert1"]
assert result["error"] == param["assert1"]
# if result["error"] == 1:
# assert r["message"] == param["assert"]
# if r["error"] == 1:
# 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
......@@ -12,9 +12,18 @@ class TestIndexV9:
@pytest.mark.parametrize("param",indexv9_data,ids=indexv9_case)
def test_index_v9(self,param):
r = feed_request().index_v9(param["tabtype"], param["version"], param["current_city_id"])
if r["error"] == 0:
if param['tabtype'] == "customize_commodity" :
r = feed_request().index_v9(param["tabtype"],param["version"],param["current_city_id"],param['tab_id'])
assert r["error"] == 0
features = r.get("data").get("features",[])
assert len(features) > param["assert"]
else:
r = feed_request().index_v9(param["tabtype"],param["version"], param["current_city_id"])
if r["error"] == 0:
features = r.get("data").get("features",[])
assert len(features) > param["assert"]
......@@ -8,12 +8,15 @@ from all_backend_api.filter_request import filter_request
class TestServiceHomeCityV2:
data = BaseRequest().api_load(path_setting.FILTER)
servicehomecityv2_case, servicehomecityv2_data = get_ids(data, "service_home_city_v2")
service_home_city_v2_case, service_home_city_v2_data = get_ids(data, "service_home_city_v2")
@pytest.mark.parametrize("param", servicehomecityv2_data, ids=servicehomecityv2_case)
@pytest.mark.parametrize("param", service_home_city_v2_data, ids=service_home_city_v2_case)
def test_service_home_city_v2(self, param):
r = filter_request().service_home_city_v2(param["current_city_id"], param["lat"], param["lng"])
# print('feng=', r)
if r["error"] == 0:
assert len(r["data"]["area"]) > 0
if param["current_city_id"] == "worldwide":
assert r["error"] == param["assert_worldwide"]
if param["lat"] == "39.98316321398558" and param["lng"] == "116.4881236681604":
assert r["data"]["recommend"]["located"][0]["id"] == param["assert_beijing"]
if param["lat"] == "45.742347" and param["lng"] == "126.661669":
assert r["data"]["recommend"]["located"][0]["id"] == param["assert_haerbin"]
......@@ -6,7 +6,7 @@ from in_common.base_request import BaseRequest
from all_backend_api.im_request import im_request
class TestConversationDetail:
'''class TestConversationDetail:
data = BaseRequest().api_load(path_setting.CONVERSATION_DETAIL)
conversationdetail_case, conversationdetail_data = get_ids(data, "conversation_detail")
......@@ -15,5 +15,5 @@ class TestConversationDetail:
r = im_request().conversation_detail(param["current_city_id"], param["begin_msg_id"], param["conversation_type"], param["end_msg_id"], param["referrer"])
if r["error"] == 0:
msg_list = r.get("data").get("msg_list",[])
assert len(msg_list) > param["assert"]
assert len(msg_list) > param["assert"]'''
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.im_request import im_request
class TestRobotGetSecond:
data = BaseRequest().api_load(path_setting.ROBOT_GET_SECOND)
robot_get_second_case, robot_get_second_data = get_ids(data, "robot_get_second")
@pytest.mark.parametrize("param", robot_get_second_data, ids=robot_get_second_case)
def test_robot_get_second(self, param):
r = im_request().robot_get_second(param["page_type"])
print(r)
if r["error"] == 0:
assert r["data"]["second"] == param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.im_request import im_request
class TestRobotSendMsg:
data = BaseRequest().api_load(path_setting.ROBOT_SEND_MSG)
robot_send_msg_case, robot_send_msg_data = get_ids(data, "robot_send_msg")
@pytest.mark.parametrize("param", robot_send_msg_data, ids=robot_send_msg_case)
def test_robot_send_msg(self, param):
r = im_request().robot_send_msg(param["hospital_id"], param["is_system"], param["page_type"], param["req_source"], param["target_user_id"], param["version"])
print(r)
assert r["error"] == param["assert"]
#if r["error"] == 0:
#assert r["data"]["second"] == param["assert"]
......@@ -6,7 +6,7 @@ from in_common.base_request import BaseRequest
from all_backend_api.im_request import im_request
class TestSendMsg:
'''class TestSendMsg:
data = BaseRequest().api_load(path_setting.SEND_MSG)
sendmsg_case, sendmsg_data = get_ids(data, "send_msg")
......@@ -18,5 +18,5 @@ class TestSendMsg:
assert r["data"]["conversation_type"] == param["assert_conversation_type"]
assert r["data"]["message_type"] == param["assert_message_type"]
if r["error"] == 1:
assert r["message"] == param["assert_message"]
assert r["message"] == param["assert_message"]'''
......@@ -16,7 +16,7 @@ class TestProductDetail:
if r["error"] == 0:
assert r["error"] == param["assert_error"]
assert r["data"]["service_hospital"]["services"] != param["assert_service_hospital"]
if r["error"] == 1:
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
......@@ -8,13 +8,13 @@ from all_backend_api.janus_request import janus_request
class TestTagService:
data = BaseRequest().api_load(path_setting.TAG_SERVICE)
tagservice_case, tagservice_data = get_ids(data, "tag_service")
tag_service_case, tag_service_data = get_ids(data, "tag_service")
@pytest.mark.parametrize("param", tagservice_data, ids=tagservice_case)
@pytest.mark.parametrize("param", tag_service_data, ids=tag_service_case)
def test_tag_service(self, param):
r = janus_request().tag_service(param["size"], param["tag_ids"], param["offset"], param["tag_id"], param["version"], param["device_id"])
#print('feng=', r)
r = janus_request().tag_service(param["size"], param["tag_ids"], param["offset"],
param["version"], param["device_id"])
# print('feng=', r)
if r["error"] == 0:
assert r["error"] == param["assert"]
assert r["data"]["offset"] == param["offset"]
assert r["error"] == param["assert"]
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 TestChangePwd:
data = BaseRequest().api_load(path_setting.CHANGE_PWD)
change_pwd_case, change_pwd_data = get_ids(data, "change_pwd")
@pytest.mark.parametrize("param",change_pwd_data, ids=change_pwd_case)
def test_change_pwd(self, param):
r = user_request().change_pwd(param["version"], param["change_type"],param["new_password"],param["repeat_password"])
if r.get("error_code") == 22006:
assert r["message"] == param["assert"]
elif r.get("error_code") == -1:
assert r["message"] == param["assert"]
elif r.get("error") == 0:
assert r["error"] == param["assert1"]
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 TestChangePwdd:
data = BaseRequest().api_load(path_setting.CHANGE_PWDD)
change_pwdd_case, change_pwdd_data = get_ids(data, "change_pwdd")
@pytest.mark.parametrize("param",change_pwdd_data, ids=change_pwdd_case)
def test_change_pwdd(self, param):
r = user_request().change_pwdd(param["version"],param["password"] ,param["change_type"],param["new_password"],param["repeat_password"])
if r.get("error_code") == 22006:
assert r["message"] == param["assert"]
elif r.get("error_code") == -1:
assert r["message"] == param["assert"]
elif r.get("error") == 0:
assert r["error"] == param["assert"]
# else:
# 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.user_request import user_request
class TestCheckPwd:
data = BaseRequest().api_load(path_setting.CHECK_PWD)
check_pwd_case, check_pwd_data = get_ids(data, "check_pwd")
@pytest.mark.parametrize("param",check_pwd_data, ids=check_pwd_case)
def test_check_pwd(self, param):
r = user_request().check_pwd()
if r["error"] == 0:
assert r["error"] == param["assert"]
\ 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.verification_code_request import verification_code_request
class TestVerificationCode:
data = BaseRequest().api_load(path_setting.VERIFICATION_CODE)
verification_code_case, verification_code_data = get_ids(data, "verification_code")
@pytest.mark.parametrize("param",verification_code_data, ids=verification_code_case)
def test_verification_code(self, param):
r = verification_code_request().verification_code(param["phone"], param["type"], param["verifier"])
if r["error"] == 0:
assert r["error"] == param["assert"]
......@@ -12,10 +12,14 @@ class TestBeautyCardFilters:
@pytest.mark.parametrize("param", beautycard_filters_data, ids=beautycard_filters_case)
def test_beautycard_filters(self, param):
print('次卡商品列表筛选器')
r = visual_beauty_card_request().beautycard_filters(param["unit_id"], param["current_city_id"], param["version"])
if r["data"]:
print('次卡商品列表筛选器下拉列表有值')
assert len(r["data"]["field"]) != param["assert"]
assert len(r["data"]["areas"]) != param["assert"]
assert len(r["data"]["order"]) != param["assert"]
\ No newline at end of file
if param["unit_id"] == "20109":
assert len(r["data"]) > param["assert_spu"]
assert len(r["data"]["field"]) is not None
assert len(r["data"]["areas"]) is not None
assert len(r["data"]["order"]) is not None
if param["unit_id"] == "20113":
assert len(r["data"]) > param["assert_sku"]
assert len(r["data"]["field"]) is not None
assert len(r["data"]["areas"]) is not None
assert len(r["data"]["order"]) is not None
......@@ -12,12 +12,24 @@ class TestBeautyCardSkus:
@pytest.mark.parametrize("param", beautycard_skus_data, ids=beautycard_skus_case)
def test_beautycard_skus(self, param):
print('次卡商品列表组件商品')
r = visual_beauty_card_request().beautycard_skus(param["unit_id"], param["tag_id"], param["area"], param["sort_type"], param["page"], param["page_size"], param["version"])
if r["data"]:
print('次卡商品列表组件有商品召回')
assert len(r["data"]["beautycards"]) != param["assert"]
r = visual_beauty_card_request().beautycard_skus(param["unit_id"], param["tag_id"], param["area"],
param["sort_type"], param["page"], param["page_size"],
param["version"])
if r["error"] == 0:
assert len(r["data"]["beautycards"]) > param["assert"]
assert r["message"] == param["assert_message"]
assert r["data"]["beautycards"][0]["bc_spu_id"] is not None
assert r["data"]["beautycards"][0]["bc_spu_name"] is not None
assert r["data"]["beautycards"][0]["bc_sku_id"] is not None
assert r["data"]["beautycards"][0]["bc_sku_name"] is not None
assert r["data"]["beautycards"][0]["bc_image"] is not None
assert r["data"]["beautycards"][0]["bc_origin_price"] is not None
assert r["data"]["beautycards"][0]["bc_gengmei_price"] is not None
assert r["data"]["beautycards"][0]["sales_amount"] is not None
assert r["data"]["beautycards"][0]["gm_url"] is not None
assert r["data"]["beautycards"][0]["rank"] is not None
assert r["data"]["beautycards"][0]["has_discount"] is not None
assert r["data"]["beautycards"][0]["bc_discount_total_payment"] is not None
else:
assert r["message"] == param["assert_message"]
print('接口出错了')
\ No newline at end of file
print('接口出错了')
......@@ -12,8 +12,32 @@ class TestVisualBeautyCardServices:
@pytest.mark.parametrize("param", visual_beauty_card_services_data, ids=visual_beauty_card_services_case)
def test_visual_beauty_card_services(self, param):
print('次卡橱窗')
r = visual_beauty_card_request().visual_beauty_card_services(param["unit_id"], param["current_city_id"], param["page"], param["page_size"], param["version"])
if r["data"]["beautycards"]:
print('次卡橱窗有商品')
assert len(r["data"]["beautycards"]) != param["assert"]
\ No newline at end of file
if param["unit_id"] == "20105":
assert len(r["data"]["beautycards"]) > param["assert_spu"]
assert r["data"]["beautycards"][0]["bc_spu_id"] is not None
assert r["data"]["beautycards"][0]["bc_spu_name"] is not None
assert r["data"]["beautycards"][0]["bc_sku_id"] is not None
assert r["data"]["beautycards"][0]["bc_sku_name"] is not None
assert r["data"]["beautycards"][0]["bc_image"] is not None
assert r["data"]["beautycards"][0]["bc_origin_price"] is not None
assert r["data"]["beautycards"][0]["bc_gengmei_price"] is not None
assert r["data"]["beautycards"][0]["sales_amount"] is not None
assert r["data"]["beautycards"][0]["gm_url"] is not None
assert r["data"]["beautycards"][0]["rank"] is not None
assert r["data"]["beautycards"][0]["has_discount"] is not None
assert r["data"]["beautycards"][0]["bc_discount_total_payment"] is not None
if param["unit_id"] == "20106":
assert len(r["data"]["beautycards"]) > param["assert_sku"]
assert r["data"]["beautycards"][0]["bc_spu_id"] is not None
assert r["data"]["beautycards"][0]["bc_spu_name"] is not None
assert r["data"]["beautycards"][0]["bc_sku_id"] is not None
assert r["data"]["beautycards"][0]["bc_sku_name"] is not None
assert r["data"]["beautycards"][0]["bc_image"] is not None
assert r["data"]["beautycards"][0]["bc_origin_price"] is not None
assert r["data"]["beautycards"][0]["bc_gengmei_price"] is not None
assert r["data"]["beautycards"][0]["sales_amount"] is not None
assert r["data"]["beautycards"][0]["gm_url"] is not None
assert r["data"]["beautycards"][0]["rank"] is not None
assert r["data"]["beautycards"][0]["has_discount"] is not None
assert r["data"]["beautycards"][0]["bc_discount_total_payment"] is not None
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.visual_request import visual_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestServiceList:
data = BaseRequest().api_load(path_setting.VISUAL_SERVICE_LIST)
service_list_case, service_list_data = get_ids(data, "service_list")
#
@pytest.mark.parametrize("param", service_list_data, ids=service_list_case)
def test_service_list(self, param):
r = visual_request().service_list(param["unit_id"])
assert r["error"] == 0
list = r.get("data").get("services",[])
assert len(list) == param["len"]
diary_operation:
diary_additional_info:
#修改日记本信息case--
-
case: "修改信息"
......@@ -8,6 +8,7 @@ diary_operation:
doctor_name: "也一样"
hospital_name: "一样一样"
assert: "没有权限"
assert1: 0
-
......@@ -18,6 +19,7 @@ diary_operation:
doctor_name: "测试"
hospital_name: "测试"
assert: "没有权限"
assert1: 0
......
index_ai:
-
case: "模拟双眼皮,新版本feed流"
tag_names: '["埋线双眼皮","定点双眼皮","切开双眼皮"]'
scan_type: 6
offset: 2
current_city_id: "beijing"
......@@ -7,14 +7,15 @@ index_v9:
version: "7.42.2"
assert: 0
- case: "推荐内容/接口请求成功,有数据返回"
- case: "直播tab请求成功,有数据返回"
current_city_id: "beijing"
tabtype: "home_video"
version: "7.42.2"
assert: 0
- case: "直播tab接口请求成功,有数据返回"
- case: "推荐内容/接口接口请求成功,有数据返回 "
current_city_id: "beijing"
tabtype: "customize_commodity"
version: "7.42.2"
assert: 0
\ No newline at end of file
version: 7.47.1
assert: 0
tab_id: 96
#城市筛选器
service_home_city_v2:
-
case: "城市筛选器接口"
case: "城市筛选器接口-current_city_id为空case-经纬度北京"
current_city_id: ""
lat: "39.98316321398558"
lng: "116.4881236681604"
assert_beijing: "beijing"
-
case: "城市筛选器接口-current_city_id为空case-经纬度哈尔滨"
current_city_id: ""
lat: "45.742347"
lng: "126.661669"
assert_haerbin: "haerbin"
-
case: "城市筛选器接口-全部城市case"
current_city_id: "worldwide"
lat: "40.002"
lng: "116.487252"
assert: 0
assert_worldwide: 0
......
robot_get_second:
#获取页面触发私信时间-商详页case
-
case: "商详页"
page_type: "1"
assert: 5
#获取页面触发私信时间-机构主页case
-
case: "机构主页"
page_type: "2"
assert: 5
#获取页面触发私信时间-医生主页case
-
case: "医生主页"
page_type: "3"
assert: 5
#获取页面触发私信时间-综搜页case
-
case: "综搜页"
page_type: "4"
assert: 1
#获取页面触发私信时间-聚合页case
-
case: "聚合页"
page_type: "5"
assert: 1
\ No newline at end of file
robot_send_msg:
#给用户发私信-商详页普通用户case
-
case: "商详页"
version: "7.46.0"
page_type: "1"
hospital_id: "715368769fea4a1ba0c85979112ed154"
is_system: 1
req_source: "gengmei"
target_user_id: 33909952
assert: 0
#给用户发私信-商详页医生用户case
-
case: "商详页"
version: "7.46.0"
page_type: "1"
hospital_id: "715368769fea4a1ba0c85979112ed154"
is_system: 1
req_source: "gengmei"
target_user_id: 33910245
assert: 0
#给用户发私信-机构主页普通用户case
-
case: "机构主页"
version: "7.46.0"
page_type: "2"
hospital_id: "715368769fea4a1ba0c85979112ed154"
is_system: 1
req_source: "gengmei"
target_user_id: 33909952
assert: 0
#给用户发私信-机构主页医生用户case
-
case: "机构主页"
version: "7.46.0"
page_type: "2"
hospital_id: "715368769fea4a1ba0c85979112ed154"
is_system: 1
req_source: "gengmei"
target_user_id: 33910245
assert: 0
#给用户发私信-医生主页普通用户case
-
case: "医生主页普通用户"
version: "7.46.0"
page_type: "3"
hospital_id: "715368769fea4a1ba0c85979112ed154"
is_system: 1
req_source: "gengmei"
target_user_id: 33909952
assert: 0
#给用户发私信-医生主页医生用户case
-
case: "医生主页医生用户"
version: "7.46.0"
page_type: "3"
hospital_id: "715368769fea4a1ba0c85979112ed154"
is_system: 1
req_source: "gengmei"
target_user_id: 33910245
assert: 0
#给用户发私信-综搜页普通用户case
-
case: "综搜页普通用户"
version: "7.46.0"
page_type: "4"
hospital_id: "715368769fea4a1ba0c85979112ed154"
is_system: 1
req_source: "gengmei"
target_user_id: 33909952
assert: 0
#给用户发私信-综搜页医生用户case
-
case: "综搜页医生用户"
version: "7.46.0"
page_type: "4"
hospital_id: "715368769fea4a1ba0c85979112ed154"
is_system: 1
req_source: "gengmei"
target_user_id: 33910245
assert: 0
#给用户发私信-聚合页普通用户case
-
case: "聚合页"
version: "7.46.0"
page_type: "5"
hospital_id: "715368769fea4a1ba0c85979112ed154"
is_system: 1
req_source: "gengmei"
target_user_id: 33909952
assert: 0
#给用户发私信-聚合页医生用户case
-
case: "聚合页"
version: "7.46.0"
page_type: "5"
hospital_id: "715368769fea4a1ba0c85979112ed154"
is_system: 1
req_source: "gengmei"
target_user_id: 33910245
assert: 0
\ No newline at end of file
......@@ -5,12 +5,22 @@ product_detail:
service_item_id: "618788"
version: "7.43.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"
service_id: "585726"
service_item_id: "618788"
version: "7.43.0"
assert_spu_message: "美购不存在"
# -
# case: "校验sku_id错误case"
# 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
......@@ -6,7 +6,6 @@ tag_service:
size: 10
tag_ids: []
offset: 0
tag_id:
version: 7.43.0
device_id: 869378034450718
......
......@@ -39,7 +39,7 @@ push_live_info:
cover_url: "2021/04/22/1003/cef471cff5e6"
notice: "公告"
tag_id: "1"
clarity: "2"
clarity: "3"
device_type: "1"
assert: 0
# assert_message1 : "请登录后再试"
......
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:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-08-16 17:31:08
content: ces测试+2021-08-20 17:25:16
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......
change_pwd:
#忘记密码-设置密码
-
case: "新密码不可与旧密码相同"
version: 7.47.0
change_type: 1
new_password: 123456
repeat_password: 123456
assert: "新密码不可与旧密码相同"
#error_code: 22006
-
case: "密码不符合要求"
version: 7.48.0
change_type: 1
new_password: 123456
repeat_password: 123456
assert: "密码应包含数字、大小写字母、特殊字符的两种或两种以上"
-
case: "密码长度不对"
version: 7.48.0
change_type: 1
new_password: 12345
repeat_password: 12345
assert: "密码长度在6-16位之间"
-
case: "两次输入密码不一致"
version: 7.48.0
change_type: 1
new_password: 123456
repeat_password: 1234567
assert: "两次输入的密码不一致"
-
case: "修改密码成功"
version: 7.48.0
change_type: 1
new_password: ceshi123
repeat_password: ceshi123
assert1: 0
-
case: "修改密码成功2"
version: 7.47.0
change_type: 1
new_password: 123456
repeat_password: 123456
assert1: 0
change_pwdd:
#修改密码
-
case: "新密码不可与旧密码相同"
version: 7.47.0
change_type: 0
password: 123456
new_password: 123456
repeat_password: 123456
assert: "新密码不可与旧密码相同"
-
case: "密码不符合要求"
version: 7.48.0
change_type: 0
password: 123456
new_password: 123456
repeat_password: 123456
assert: "密码应包含数字、大小写字母、特殊字符的两种或两种以上"
-
case: "密码长度不对"
version: 7.48.0
change_type: 0
password: 123456
new_password: 12345
repeat_password: 12345
assert: "密码长度在6-16位之间"
-
case: "两次输入密码不一致"
version: 7.48.0
change_type: 0
password: 123456
new_password: 123456
repeat_password: 1234567
assert: "两次输入的密码不一致"
-
case: "修改密码成功"
version: 7.48.0
change_type: 0
password: 123456
new_password: ceshi123
repeat_password: ceshi123
assert: 0
-
case: "修改密码成功2"
version: 7.47.0
change_type: 0
password: 123456
new_password: 123456
repeat_password: 123456
assert: 0
-
case: "新用户设置密码-密码不符合要求"
version: 7.48.0
change_type: 0
password: {}
new_password: 123456
repeat_password: 123456
assert: "密码应包含数字、大小写字母、特殊字符的两种或两种以上"
check_pwd:
#点击修改密码时获取用户信息
-
case: "点击修改密码时成功获取用户信息"
assert: 0
\ No newline at end of file
verification_code:
-
#发送验证码
case: "发送验证码"
phone: 12345678999
type: 2
verifier: 'fd94aa08c242a00496aba1e5b556c436'
assert: 0
......@@ -4,13 +4,26 @@ beautycard_filters:
case: "更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常"
unit_id: "20109"
current_city_id: "beijing"
version: "743.0"
assert: 0
version: "7.43.0"
assert_spu: 0
-
#更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常
case: "更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常"
unit_id: "20109"
current_city_id: "beijing"
version: "7.43.0"
assert_spu: 0
-
#更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常
case: "更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常"
unit_id: "20113"
current_city_id: "beijing"
version: "7.43.0"
assert_sku: 0
-
#更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常
case: "更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常"
unit_id: "20113"
current_city_id: "beijing"
version: "743.0"
assert: 0
\ No newline at end of file
version: "7.43.0"
assert_sku: 0
\ No newline at end of file
......@@ -8,7 +8,7 @@ beautycard_skus:
sort_type: "0"
page: "0"
page_size: "20"
version: "747.0"
version: "7.47.0"
assert: 0
assert_message: ""
......@@ -21,7 +21,7 @@ beautycard_skus:
sort_type: "0"
page: "0"
page_size: "20"
version: "747.0"
version: "7.47.0"
assert: 0
assert_message: ""
......@@ -34,7 +34,7 @@ beautycard_skus:
sort_type: "2"
page: "0"
page_size: "20"
version: "747.0"
version: "7.47.0"
assert: 0
assert_message: ""
......@@ -47,7 +47,7 @@ beautycard_skus:
sort_type: "2"
page: "0"
page_size: "20"
version: "747.0"
version: "7.47.0"
assert: 0
assert_message: ""
......@@ -60,7 +60,7 @@ beautycard_skus:
sort_type: "1"
page: "0"
page_size: "20"
version: "747.0"
version: "7.47.0"
assert: 0
assert_message: ""
......@@ -73,7 +73,7 @@ beautycard_skus:
sort_type: "1"
page: "0"
page_size: "20"
version: "747.0"
version: "7.47.0"
assert: 0
assert_message: ""
......@@ -86,7 +86,7 @@ beautycard_skus:
sort_type: "3"
page: "0"
page_size: "20"
version: "747.0"
version: "7.47.0"
assert: 0
assert_message: ""
......@@ -99,7 +99,7 @@ beautycard_skus:
sort_type: "3"
page: "0"
page_size: "20"
version: "747.0"
version: "7.47.0"
assert: 0
assert_message: ""
......@@ -112,7 +112,7 @@ beautycard_skus:
sort_type: "2"
page: "0"
page_size: "20"
version: "747.0"
version: "7.47.0"
assert: 0
assert_message: ""
......@@ -125,6 +125,32 @@ beautycard_skus:
sort_type: "1"
page: "0"
page_size: "20"
version: "747.0"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SPU导入,接口返回字段正常case
case: "更美次卡商品列表组件商品-按SPU导入,接口返回字段正常case"
unit_id: "20109"
tag_id: "-1"
area: "worldwide"
sort_type: "0"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SKU导入,接口返回字段正常case
case: "更美次卡商品列表组件商品-按SKU导入,接口返回字段正常case"
unit_id: "20113"
tag_id: "-1"
area: "worldwide"
sort_type: "0"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
visual_beauty_card_services:
-
#更美次卡橱窗-按SPU导入,定位北京,商品正常召回
case: "更美次卡橱窗-按SPU导入,定位北京,商品正常召回"
case: "更美次卡橱窗-按SPU导入,定位北京,商品正常召回case"
unit_id: "20105"
current_city_id: "beijing"
page: "0"
page_size: "50"
version: "743.0"
assert: 0
version: "7.43.0"
assert_spu: 0
-
#更美次卡橱窗-按SPU导入,定位北京,接口字段返回正常
case: "更美次卡橱窗-按SPU导入,定位北京,接口字段返回正常case"
unit_id: "20105"
current_city_id: "beijing"
page: "0"
page_size: "50"
version: "7.43.0"
assert_spu: 0
-
#更美次卡橱窗-按SKU导入,定位北京,商品正常召回
case: "更美次卡橱窗-按SKU导入,定位北京,商品正常召回"
case: "更美次卡橱窗-按SKU导入,定位北京,商品正常召回case"
unit_id: "20106"
current_city_id: "beijing"
page: "0"
page_size: "50"
version: "7.43.0"
assert_sku: 0
-
#更美次卡橱窗-按SKU导入,定位北京,接口字段返回正常
case: "更美次卡橱窗-按SKU导入,定位北京,接口字段返回正常case"
unit_id: "20106"
current_city_id: "beijing"
page: "0"
page_size: "50"
version: "743.0"
assert: 0
\ No newline at end of file
version: "7.43.0"
assert_sku: 0
\ No newline at end of file
#签到--其他tab 美购feed
service_list:
-
case: "签到--其他tab 美购feed 校验返回数据数"
assert: 0
len: 10
unit_id: 17923
\ No newline at end of file
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web3_request import web3_request
class TestConversationRobotAddMessage:
data = BaseRequest().api_load(path_setting.ROBOTADDMESSAGE)
robot_add_message_case, robot_add_message_data = get_ids(data, "conversation_robot_add_message")
@pytest.mark.parametrize("param",robot_add_message_data,ids=robot_add_message_case)
def test_conversation_robot_add_message(self, param):
'''私信机器人-添加私信配置'''
r = web3_request().conversation_robot_add_message(param["message"], param["csrfmiddlewaretoken"])
if r["error"] == 0:
assert r["message"] == param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web3_request import web3_request
class TestConversationRobotGetPage:
data = BaseRequest().api_load(path_setting.ROBOTGETPAGE)
robot_get_page_case, robot_get_page_data = get_ids(data, "conversation_robot_get_page")
@pytest.mark.parametrize("param",robot_get_page_data,ids=robot_get_page_case)
def test_conversation_robot_get_page(self, param):
'''私信机器人-获取页面类型'''
r = web3_request().conversation_robot_get_page()
if r["error"] == 0:
#flows_list = r.get("data").get("flows_list", [])
assert r["data"]["1"] == param["assert1"]
assert r["data"]["2"] == param["assert2"]
assert r["data"]["3"] == param["assert3"]
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 TestDoctorDoctorlist:
data = BaseRequest().api_load(path_setting.DOCTORLIST)
doctor_doctorlist_case, doctor_doctorlist_data = get_ids(data, "doctor_doctorlist")
@pytest.mark.parametrize("param",doctor_doctorlist_data,ids=doctor_doctorlist_case)
def test_doctor_doctorlist(self, param):
'''医生列表'''
r = web_request().doctor_doctorlist(param['doctor_type'])
assert r["error"] == 0
assert r["data"]['doctors'] is not None and type(r["data"]['doctors']) is list
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 TestDoctorVerificationcode:
data = BaseRequest().api_load(path_setting.DOCTOR_VERIIFICATIONCODE)
doctor_verificationcode_case, doctor_verificationcode_data = get_ids(data, "doctor_verificationcode")
@pytest.mark.parametrize("param",doctor_verificationcode_data,ids=doctor_verificationcode_case)
def test_doctor_verificationcode(self, param):
'''医生列表'''
r = web_request().doctor_verificationcode(param['phone'])
assert r["error"] == 0
assert r['data']['code'] == param["code"]
assert r['data']['message'] == param["message"]
conversation_robot_add_message:
#私信机器人-添加私信配置
-
case: "私信机器人-只填写默认配置-文本"
message: '{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"测试"}]}],"personality":[]}'
csrfmiddlewaretoken: "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert: "配置成功"
-
case: "私信机器人-只填写默认配置-图片"
message: '{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"2","content":"https://heras.igengmei.com/service/2021/08/19/55aba3145e"}]}],"personality":[]}'
csrfmiddlewaretoken: "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert: "配置成功"
-
case: "私信机器人-只填写默认配置-优惠券"
message: '{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"9","content":"59055,51"}]}],"personality":[]}'
csrfmiddlewaretoken: "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert: "配置成功"
-
case: "私信机器人-只填写默认配置-文本+图片"
message: '{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置的文本"},{"id":"","type":"2","content":"https://heras.igengmei.com/service/2021/08/19/287ca8f095"}]}],"personality":[]}'
csrfmiddlewaretoken: "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert: "配置成功"
-
case: "私信机器人-只填写默认配置-文本+优惠券"
message: '{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置的文本"},{"id":"","type":"9","content":"59055,51"}]}],"personality":[]}'
csrfmiddlewaretoken: "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert: "配置成功"
-
case: "私信机器人-只填写默认配置-文本+图片+优惠券"
message: '{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"},{"id":"","type":"2","content":"https://heras.igengmei.com/service/2021/08/20/1e03212794"},{"id":"","type":"9","content":"59055,51"}]}],"personality":[]}'
csrfmiddlewaretoken: "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert: "配置成功"
-
case: "私信机器人-只填写默认配置-图片+优惠券"
message: '{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"2","content":"https://heras.igengmei.com/service/2021/08/19/a3e25ac9e7"},{"id":"","type":"9","content":"59055,51"}]}],"personality":[]}'
csrfmiddlewaretoken: "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert: "配置成功"
-
case: "私信机器人-只填写默认配置-配置5条"
message: '{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"2","content":"https://heras.igengmei.com/service/2021/08/19/a3e25ac9e7"},{"id":"","type":"9","content":"59055,51"},{"id":"","type":"0","content":"这是默认配置文本"},{"id":"","type":"0","content":"这是文本"},{"id":"","type":"2","content":"https://heras.igengmei.com/service/2021/08/19/36850a11c5"}]}],"personality":[]}'
csrfmiddlewaretoken: "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert: "配置成功"
-
case: "私信机器人-只填写默认配置-敏感词"
message: '{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是敏感词呀微信"}]}],"personality":[]}'
csrfmiddlewaretoken: "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert: "默认配置不能为空且文本不能含有敏感词,敏感词示例:私聊、微信、私信等"
-
case: "私信机器人-默认配置文本+个性配置机构文本"
message: '{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"}]}],"personality":[{"name":"机构主页","page_type":"2","tag_id":"","doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"这是机构主页文案"}]}]}'
csrfmiddlewaretoken: "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert: "配置成功"
-
case: "私信机器人-默认配置文本+个性配置医生文本"
message: '{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"}]}],"personality":[{"name":"医生主页","page_type":"3","tag_id":"","doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"这是医生主页文案"}]}]}'
csrfmiddlewaretoken: "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert: "配置成功"
-
case: "私信机器人-默认配置文本+个性配置商详页眼科-文本"
message: '{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"}]}],"personality":[{"name":"商详页","page_type":"1","tag_id":12711,"doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"这是商详页文案"}]}]}'
csrfmiddlewaretoken: "qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert: "配置成功"
conversation_robot_get_page:
#私信机器人-获取页面类型
-
case: "私信机器人-获取页面类型"
#month: "2021-7"
assert1: "商品详情页"
assert2: "机构主页"
assert3: "医生主页"
doctor_doctorlist:
#医生后台-商户管理-医生管理列表case
-
case: "医生后台-商户管理-医生管理列表--已创建"
assert_size: 10
assert: 10
doctor_type: 0
-
case: "医生后台-商户管理-医生管理列表--审核中"
assert_size: 10
assert: 10
doctor_type: 1
\ No newline at end of file
doctor_verificationcode:
#医生后台-商户管理-医生管理列表--创建医生--医生发送验证码case
-
case: "医生后台-商户管理-医生管理列表--创建医生--医生发送验证码--发送不存在的用户的手机号"
assert_size: 10
assert: 10
phone: 12341234124
message: '请先用该号码在更美pc站或者app注册更美用户账号!'
code: 1
-
case: "医生后台-商户管理-医生管理列表--创建医生--医生发送验证码--发送存在的用户但是已经是医生账号的手机号"
assert_size: 10
assert: 10
phone: 12345654321
message: '该手机号已经注册为医生或机构,请更换手机号重新注册!'
code: 1
- case: "医生后台-商户管理-医生管理列表--创建医生--医生发送验证码--发送存在的用户但不是医生账号的手机号"
assert_size: 10
assert: 10
phone: 12341234121
message: '发送成功!'
code: 0
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 TestCategortAdd:
data = BaseRequest().api_load(path_setting.ACHELOUS_CATEGORY_ADD_DATA)
catalog_add_case, catalog_add_data = get_ids(data, 'catalog_add')
@pytest.mark.parametrize("param", catalog_add_data, ids=catalog_add_case)
def test_category_add(self, param):
import datetime
dt = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
r = achelous_request().catalog_add(param["tag_system_type"], param["tag_name"]+dt, param["father_tag_id"], param["child_tag_ids"], param["is_online"], param["is_display"], param["is_move"])
print(r)
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 TestCatrgoryExportCatlogDatas:
def test_industry_search(self):
r = achelous_request().category_export_catalog_datas()
print(r)
assert r["msg"] == "success"
assert r["data"] is True
assert r["code"] == 0
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 TestCategortOrdering:
data = BaseRequest().api_load(path_setting.ACHELOUS_CATEGORY_ORDERING_DATA)
category_ordering_case, category_ordering_data = get_ids(data, 'category_ordering')
@pytest.mark.parametrize("param", category_ordering_data, ids= category_ordering_case)
def test_category_ordering(self, param):
r = achelous_request().category_ordering(param["tag_id"], param["tag_type"],param["tag_system_type"], param["operation_type"])
print(r)
if r["code"] == 0 and r["msg"] == "success":
assert len(r["data"]) > 0
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 TestIndustrySearch:
data = BaseRequest().api_load(path_setting.ACHELOUS_INDUSTRY_SEARCH_DATA)
industry_search_case, industry_search_data = get_ids(data, 'industry_search')
@pytest.mark.parametrize("param", industry_search_data, ids= industry_search_case)
def test_industry_search(self, param):
r = achelous_request().industry_search(param["tag_system_type"], param["tag_id"],param["tag_name"],param["is_online"], param["is_display"], param["is_move"], param["page"], param["size"])
print(r)
assert r["code"] == 0
assert len(r["data"]["data"]) > 0
#OM后台-商业分类管理,后台分类(工业),添加分类
catalog_add:
-
case: '工业分类,增加分类'
tag_system_type: 1
tag_name: "自动化接口测试添加"
father_tag_id: 15510
child_tag_ids: []
is_online: "false"
is_display: "false"
is_move: "false"
\ No newline at end of file
#OM后台-商业分类管理,后台分类(工业),标签排序
category_ordering:
-
case: '后台分类(工业) 上升'
tag_id: 1002463
tag_type: 1
tag_system_type: 1
operation_type: 1
-
case: '后台分类(工业) 下降'
tag_id: 1002463
tag_type: 1
tag_system_type: 1
operation_type: 2
\ No newline at end of file
#OM后台-商业分类管理,后台分类(工业)
industry_search:
-
case: '搜索标签-名称模糊搜索'
tag_system_type: 1
tag_name: "白"
tag_id: ""
is_online: "all"
is_display: "all"
is_move: "all"
page: 1
size: 10
-
case: '搜索标签-根据id'
tag_system_type: 1
tag_name: ""
tag_id: 1002542
is_online: "all"
is_display: "all"
is_move: "all"
page: 1
size: 10
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment