Commit 3cd38dba authored by aha's avatar aha

合并common代码

parents 66d67315 abafafe9
No preview for this file type
......@@ -105,4 +105,5 @@ venv.bak/
.mypy_cache/
host.yaml
.DS_Store
*/.DS_Store
\ No newline at end of file
......@@ -12,9 +12,20 @@ class face_request(BaseRequest):
self.params["facial_type2tag_names"] = facial_type2tag_names
return self.api_send(self.data["face_diarys"])
# 3D 底部feed流
def plastic_feeds(self, tag_id, face_id, tag_id_list, page_size, version):
self.params["tag_id"] = tag_id
self.params["face_id"] = face_id
self.params["tag_id_list"] = tag_id_list
self.params["page_size"] = page_size
self.params["version"] = version
return self.api_send(self.data["plastic_feeds"])
if __name__ == '__main__':
facial_type2tag_names = '{"2":["玻尿酸垫下巴","自体脂肪垫下巴"],"3":["半永久纹眉","植眉"]}'
print(face_request().diarys_cards(facial_type2tag_names))
# facial_type2tag_names = '{"2":["玻尿酸垫下巴","自体脂肪垫下巴"],"3":["半永久纹眉","植眉"]}'
# print(face_request().diarys_cards(facial_type2tag_names))
print(face_request().plastic_feeds('2371,2372,2247,3032,2274,2277,2242,2348,2597,2318,2551,2341,2389', 9,
'[[845, 498, 497, 494], [880, 484, 3254], [276], [1070, 373, 372, 350], [494, 315], [1293, 1050], [284, 282], [254, 251], [1000, 494, 312], [295, 272, 253], [1376, 1365, 1088, 892, 395, 385], [427, 327], [3214, 1377, 1306, 1051, 327, 229]]', 10, "7.44.0"))
\ No newline at end of file
......@@ -3,3 +3,14 @@ face_diarys:
url: /api/face/diary/cards
params:
facial_type2tag_names: ${facial_type2tag_names}
plastic_feeds:
method: get
url: /api/face/plastic/feeds
params:
tag_id: ${tag_id}
face_id: ${face_id}
tag_id_list: ${tag_id_list}
page_size: ${page_size}
version: ${version}
\ No newline at end of file
......@@ -7,6 +7,7 @@ class feed_request(BaseRequest):
self.data = self.api_load(path_setting.FEED_INDEXV9_CONFIG)
self.data = self.api_load(path_setting.CONFIG_LIST_CONFIG)
self.data = self.api_load(path_setting.COMMUNITY_CONFIG)
self.data = self.api_load(path_setting.FREE_RECRUIT_BANNER_CONFIG)
def index_v9(self,tabtype,version,current_city_id):
......@@ -31,12 +32,32 @@ class feed_request(BaseRequest):
return self.api_send(self.data["community"])
# 免费招募列表的背景图片
def free_recruit_banner(self, version, json):
self.params["version"] = version
self.params["json"] = json
return self.api_send(self.data["free_recruit_banner"])
# 免费招募列表
def free_recruit_list(self, version, json, tab_type, page, size):
self.params["version"] = version
self.params["json"] = json
self.params["tab_type"] = tab_type
self.params["page"] = page
self.params["size"] = size
return self.api_send(self.data["free_recruit_list"])
if __name__ == '__main__':
print(feed_request().index_v9("choice", "7.42.2", "beijing"))
#社区tab页签到和招募活动列表
print(feed_request().config_list())
print(feed_request().config_list("7.44.0"))
#社区tab页签到和招募活动列表
print(feed_request().community())
\ 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"))
\ No newline at end of file
......@@ -31,3 +31,28 @@ community:
data:
json: {}
isLogin: 1
#招募活动列表背景图片
free_recruit_banner:
method: get
url: /api/feed/free_recruit/free_recruit_banner
params:
version: ${version}
json: ${json}
data:
json: { }
isLogin: 1
#招募活动列表
free_recruit_list:
method: get
url: /api/feed/free_recruit/list
params:
version: ${version}
json: ${json}
tab_type: ${tab_type}
page: ${page}
size: ${size}
data:
json: { }
isLogin: 1
\ No newline at end of file
......@@ -57,9 +57,15 @@ class gmai_request(BaseRequest):
self.params["version"] = version
return self.api_send(self.data["plastic_cheek_style_classify"])
# 验证用户之前是否使用过测肤质,绑定用户
def skin_user_had_test(self,device_id):
self.params["device_id"] = device_id
return self.api_send(self.data["skin_user_had_test"])
if __name__ == '__main__':
print(gmai_request().plastic_cheek_style_classify("7.44.0"))
print(gmai_request().skin_user_had_test("androidid_7255c3398845cdd5"))
# print(gmai_request().plastic_cheek_style_classify("7.44.0"))
# landmark = '[{"x":168.96603,"y":496.76886},{"x":168.35735,"y":527.7101},{"x":169.548,"y":558.3961},{"x":171.72018,"y":588.8369},{"x":174.93307,"y":619.26794},{"x":179.31195,"y":649.03467},{"x":184.17123,"y":678.6978},{"x":191.05627,"y":707.8003},{"x":200.86497,"y":735.76196},{"x":214.62796,"y":761.79736},{"x":231.40042,"y":785.7622},{"x":250.59685,"y":807.22406},{"x":272.07196,"y":826.8049},{"x":295.4251,"y":843.86194},{"x":321.47278,"y":856.83124},{"x":349.9967,"y":864.5885},{"x":379.85767,"y":866.998},{"x":409.25287,"y":865.863},{"x":437.7829,"y":859.18054},{"x":463.35132,"y":846.88574},{"x":486.354,"y":830.38916},{"x":507.7304,"y":811.95135},{"x":527.778,"y":791.59247},{"x":545.7143,"y":769.32104},{"x":561.4353,"y":745.4949},{"x":573.70917,"y":719.9794},{"x":583.3716,"y":690.47156},{"x":591.3898,"y":660.6565},{"x":598.52515,"y":631.38513},{"x":604.5137,"y":601.75684},{"x":609.14844,"y":572.0621},{"x":612.0713,"y":541.85956},{"x":613.5779,"y":511.5329},{"x":203.42625,"y":444.83066},{"x":229.21182,"y":410.30188},{"x":270.9198,"y":399.64984},{"x":313.56497,"y":407.32513},{"x":354.0185,"y":422.54175},{"x":441.31384,"y":427.71216},{"x":482.0569,"y":416.21152},{"x":524.1508,"y":412.38593},{"x":563.6658,"y":426.22824},{"x":585.87964,"y":462.41913},{"x":394.46844,"y":504.41254},{"x":393.96762,"y":546.5007},{"x":393.30322,"y":588.8532},{"x":392.592,"y":631.0979},{"x":342.77267,"y":664.1739},{"x":364.95947,"y":668.7595},{"x":390.1893,"y":673.2006},{"x":415.25336,"y":670.5106},{"x":436.7552,"y":666.998},{"x":242.81853,"y":506.60803},{"x":262.98138,"y":497.55713},{"x":305.08954,"y":499.77777},{"x":321.22906,"y":513.3391},{"x":301.56146,"y":521.4862},{"x":260.00668,"y":519.3686},{"x":462.97388,"y":517.84485},{"x":480.18396,"y":505.8437},{"x":522.09973,"y":506.45386},{"x":540.26013,"y":517.4052},{"x":523.0011,"y":528.3126},{"x":482.06146,"y":527.1489},{"x":239.75659,"y":436.6534},{"x":277.67075,"y":433.85788},{"x":315.04602,"y":438.8376},{"x":351.56638,"y":447.66888},{"x":441.58453,"y":452.58017},{"x":477.96664,"y":447.28973},{"x":515.05225,"y":445.83618},{"x":551.5746,"y":451.62656},{"x":284.38373,"y":496.0074},{"x":280.49805,"y":523.8891},{"x":284.44955,"y":508.43988},{"x":501.19617,"y":503.6411},{"x":502.51047,"y":530.9885},{"x":501.47836,"y":515.5879},{"x":357.51913,"y":508.84628},{"x":428.91504,"y":511.1767},{"x":341.02893,"y":607.7458},{"x":442.021,"y":610.8187},{"x":324.796,"y":641.13324},{"x":456.35925,"y":645.5844},{"x":304.6747,"y":728.90186},{"x":334.5838,"y":715.599},{"x":369.0162,"y":710.4512},{"x":390.31683,"y":714.9321},{"x":411.64032,"y":711.3696},{"x":445.83594,"y":718.7887},{"x":474.80075,"y":735.1745},{"x":451.05292,"y":753.0734},{"x":421.3767,"y":761.7219},{"x":390.41638,"y":763.2075},{"x":358.4326,"y":759.44385},{"x":328.53287,"y":748.5295},{"x":311.38818,"y":729.83777},{"x":350.23193,"y":734.1919},{"x":390.38123,"y":737.72284},{"x":429.7071,"y":736.18054},{"x":468.49692,"y":735.4535},{"x":430.71494,"y":739.61053},{"x":391.11005,"y":741.01697},{"x":349.98578,"y":737.08875},{"x":284.5382,"y":508.54742},{"x":501.50644,"y":515.53107}]'
# print(gmai_request().plastic_analystic_v2("869412032478155", "2021/06/01/1524/8a28dd0a3b8e",landmark,1))
# print(gmai_request().simulate_conf("-1"))
......
......@@ -64,3 +64,11 @@ plastic_cheek_style_classify:
url: /gm_ai/plastic/cheek_style_classify
params:
version: ${version}
skin_user_had_test:
method: get
url: /gm_ai/skin/user_had_test
params:
device_id: ${device_id}
isLogin: 1
\ No newline at end of file
......@@ -19,6 +19,9 @@ class janus_request(BaseRequest):
#医生医院sug列表
self.data = self.api_load(path_setting.KEYWORDTIP_CONFIG)
#次卡商详页
self.data = self.api_load(path_setting.BEAUTY_CARD_DETAIL_CONFIG)
#搜索结果页-综合/百科tab
def content_v7(self, query, device_id, current_city_id, version, is_first, tab_type, offset):
#搜索词
......@@ -94,7 +97,6 @@ class janus_request(BaseRequest):
# 品类聚合页面标签和专场
def polymer(self, version, category_polymer_id, device_id):
print("fgx")
self.params['version'] = version
self.params['category_polymer_id'] = category_polymer_id
self.params['device_id'] = device_id
......@@ -186,7 +188,62 @@ class janus_request(BaseRequest):
return self.api_send(self.data['beauty_card_order_detail'])
# 次卡商详页
def beauty_card_detail(self, spu_id, sku_id, welfareId, version, current_city_id, lat, lng ):
self.params['spu_id'] = spu_id
self.params['sku_id'] = sku_id
self.params['welfareId'] = welfareId
self.params['version'] = version
self.params['current_city_id'] = current_city_id
self.params['lat'] = lat
self.params['lng'] = lng
return self.api_send(self.data["beauty_card_detail"])
# 次卡商详-适应机构列表
def service_hospital(self, offset, sku_id, size, version, current_city_id, lat, lng):
self.params['offset'] = offset
self.params['sku_id'] = sku_id
self.params['size'] = size
self.params['version'] = version
self.params['current_city_id'] = current_city_id
self.params['lat'] = lat
self.params['lng'] = lng
return self.api_send(self.data["service_hospital"])
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_detail("100018", "10046", "100018", "7.44.0", "beijing", "40.001879", "116.487194"))
# 次卡商详页
print(janus_request().service_hospital("0", "10046", "1", "7.44.0", "beijing", "40.001879", "116.487194"))
# #打印购物车-猜你喜欢列表接口返回
# print(janus_request().mine_guess_you_like())
# #打印商祥页-详情接口返回
......
......@@ -132,6 +132,37 @@ beauty_card_update_phone:
vfc_code: ${vfc_code}
json: {}
isLogin: 1
#次卡商详页
beauty_card_detail:
method: GET
url: /api/janus/beauty_card/detail
params:
spu_id: ${spu_id}
sku_id: ${sku_id}
welfareId: ${welfareId}
version: ${version}
current_city_id: ${current_city_id}
lat: ${lat}
lng: ${lng}
data: { }
json: { }
#次卡商详页-适应机构列表
service_hospital:
method: GET
url: /api/janus/beauty_card/service_hospital
params:
offset: ${offset}
sku_id: ${sku_id}
size: ${size}
version: ${version}
current_city_id: ${current_city_id}
lat: ${lat}
lng: ${lng}
data: { }
json: { }
#次卡-提交订单
beauty_card_order_submit:
......
import path_setting
from in_common.base_request import BaseRequest
class scan_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.SCAN_DIARY_CARDS_CONFIG)
# 测颜值底部feed流
def scan_diary_cards(self, current_city_id, page,count, feature_results, feed_type):
self.params["current_city_id"] = current_city_id
self.params["page"] = page
self.params["count"] = count
self.params["feature_results"] = feature_results
self.params["feed_type"] = feed_type
return self.api_send(self.data["scan_diary_cards"])
if __name__ == '__main__':
print(scan_request().scan_diary_cards("beijing",1,10,'["细凤眼","眼距过宽","双眼皮","一字眉","流畅","厚唇","宽鼻翼","重度眼袋","尖下巴","无法令纹","娃娃脸",""]',1))
scan_diary_cards:
method: get
url: /api/scan/diary_cards
params:
current_city_id: ${current_city_id}
page: ${page}
count: ${count}
feature_results: ${feature_results}
feed_type: ${feed_type}
\ No newline at end of file
import path_setting
from in_common.base_request import BaseRequest
class skin_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.SKIN_RECOMMEND_SERVICE_CONFIG)
# 测肤质底部feed流
def skin_recommend_service(self, device_id, current_city_id, appeal_tag_ids, offset, size):
self.params["current_city_id"] = current_city_id
self.params["appeal_tag_ids"] = appeal_tag_ids
self.params["offset"] = offset
self.params["size"] = size
self.params["device_id"] = device_id
return self.api_send(self.data["skin_recommend_service"])
if __name__ == '__main__':
print(skin_request().skin_recommend_service("androidid_7255c3398845cdd5", "beijing", '[2306,2303,2551,2355,2322,2337]', 0, 10))
skin_recommend_service:
method: get
url: /api/skin/recommend_service
params:
current_city_id: ${current_city_id}
offset: ${offset}
size: ${size}
appeal_tag_ids: ${appeal_tag_ids}
device_id: ${device_id}
\ No newline at end of file
......@@ -8,7 +8,7 @@ class user_request(BaseRequest):
self.data = self.api_load(path_setting.PERSONAL_CENTER_CONFIG)
def personal_center(self):
print("fgx")
return self.api_send(self.data["personal_center"])
......@@ -37,7 +37,7 @@ class user_request(BaseRequest):
if __name__ == '__main__':
#个人中心
print(user_request().personal_center())
print("fgx")
#打印医生/医院主页问答列表接口返回
print(user_request().answer("21476198"))
......
......@@ -45,6 +45,10 @@ class web2_request(BaseRequest):
self.params["page"] = page
return self.api_send(self.SERVICE_URL["service_deletelist"])
def artemis_ad_add_shopping_cart_info(self):
#我的购物车
return self.api_send(self.SERVICE_URL["artemis_ad_add_shopping_cart_info"])
......@@ -55,4 +59,5 @@ if __name__ == '__main__':
print(web2_request().tag_all())
print(web2_request().service_delete("1","209863","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web2_request().service_deletelist("1"))#商品回收站
print(web2_request().artemis_ad_add_shopping_cart_info())
......@@ -66,3 +66,11 @@ service_deletelist:
data: {}
json: {}
isLogin: 1
artemis_ad_add_shopping_cart_info:
method: get
url: /api/web2/artemis/ad/add_shopping_cart/info
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
......@@ -61,6 +61,14 @@ class web_request(BaseRequest):
# self.params["size"] = size
# self.params["file"] = file
# return self.api_send(self.ACCOUNT_URL["file_upload"])
def cpc_homepage(self):
return self.api_send(self.ACCOUNT_URL["cpc_homepage"])
def artemis_ad_type_list(self):
return self.api_send(self.ACCOUNT_URL["artemis_ad_type_list"])
def artemis_order_list(self,status):
self.params["status"] = status
return self.api_send(self.ACCOUNT_URL["artemis_order_list"])
......@@ -78,3 +86,9 @@ if __name__ == '__main__':
print(web_request().service_all())
# print(web_request().file_upload("19","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g","WU_FILE_0","lADPDg7mQdiUTiLNAZDNAZA_400_400.jpg_720x720g.jpg","image/jpeg","Mon Apr 26 2021 11:29:45 GMT+0800 (中国标准时间)","17688","(binary)"))
print(web_request().conversation_user_id(0, "您好", 602329, "271caac2ae1687ca0a56ee18115b8183", "NLeTxEx1BOQo1zjv2us9BQ00ViMAHGpJ"))
print(web_request().cpc_homepage())
print(web_request().artemis_ad_type_list())
print("发送")
print(web_request().artemis_order_list(0))
print(web_request().artemis_order_list(1))
print(web_request().artemis_order_list(2))
\ No newline at end of file
......@@ -120,3 +120,28 @@ conversation_user_id:
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
json: {}
isLogin: 1 #需要登录
cpc_homepage:
method: get
url: /api/web/cpc/homepage
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
artemis_ad_type_list:
method: get
url: /api/web/artemis/ad/type_list
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
artemis_order_list:
method: get
url: /api/web/artemis/order/list
params:
status: ${status}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -162,11 +162,23 @@ XCX_GENGMEI_GET_WXACODE_UNLIMITED_DATA = os.path.join(BASE_DIR, "backend_auto/te
# 测颜值根据标签召回日记
FACE_DIARY_CARDS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "face_request.yaml")
FACE_DIARY_CARDS_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/face_data", "diary_cards.yaml")
# 3D变脸下feed流
FACE_PLASTIC_FEEDS_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/face_data", "plastic_feeds.yaml")
# 测颜值底部feed流
SCAN_DIARY_CARDS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "scan_request.yaml")
SCAN_DIARY_CARDS_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/scan_data", "diary_cards.yaml")
# 测肤质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")
# 测肤结果页 / AI变脸结果页
GMAI_SKIN_NEWREPORT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "gmai_request.yaml")
GMAI_SKIN_NEWREPORT_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/gmai_data", "skin_newReport.yaml")
# 用户之前是否使用过测肤功能
GMAI_SKIN_USER_HAD_TEST_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/gmai_data", "skin_user_had_test.yaml")
# 模拟双眼皮
GMAI_EYELIDS_PLASTIC_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/gmai_data", "eyelids_plastic.yaml")
# 模拟发型
......@@ -274,7 +286,6 @@ PUSH_LIVE_INFO = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_dat
#商祥页-详情
JANUS_PRODUCT_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "product_detail.yaml")
#商祥页-sku信息
......@@ -387,6 +398,14 @@ 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")
#医生后台-服务资源
ADTYPELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "artemis_ad_type_list.yaml")
#医生后台-我的购物车
ADADDSHOPPINGCARTINFO=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_ad_add_shopping_cart_info.yaml")
#医生后台-我的服务订单
ORDERLIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "artemis_order_list.yaml")
#医生后台-点点通商品-概览
CPCHOMEPAGE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_homepage.yaml")
#更美次卡橱窗组件商品
VISUAL_BEAUTY_CARD_SERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "visual_beauty_card.yaml")
......@@ -458,5 +477,21 @@ CHECK_SPU_IDS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_om_api", "beauty
CHECK_SPU_IDS = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_data", "check_spu_ids.yaml")
#次卡商详页
BEAUTY_CARD_DETAIL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
BEAUTY_CARD_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_detail.yaml")
#次卡商详页-适应机构列表
SERVICE_HOSPITAL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
SERVICE_HOSPITAL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "service_hospital.yaml")
#免费招募背景图片
FREE_RECRUIT_BANNER_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
FREE_RECRUIT_BANNER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "free_recruit_banner.yaml")
#免费招募活动列表
FREE_RECRUIT_LIST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
FREE_RECRUIT_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "free_recruit_list.yaml")
if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG)
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.face_request import face_request
class TestPlasticFeeds:
data = BaseRequest().api_load(path_setting.FACE_PLASTIC_FEEDS_DATA)
plasticfeeds_case, plasticfeeds_data = get_ids(data, "plastic_feeds")
@pytest.mark.skip("跳过,高版本会转化标签,测试环境策略没有数据,线上正常")
@pytest.mark.parametrize("param",plasticfeeds_data,ids=plasticfeeds_case)
def test_plastic_feeds(self,param):
r = face_request().plastic_feeds(param["tag_id"], param["face_id"], param["tag_id_list"], param["page_size"], param["version"])
if r["error"] == 0:
features = r["data"]["features"]
assert len(features) == param["assert_num"]
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 TestFreeRecruitBanner:
data = BaseRequest().api_load(path_setting.FREE_RECRUIT_BANNER)
free_recruit_banner_case, free_recruit_banner_data = get_ids(data, "free_recruit_banner")
@pytest.mark.parametrize("param", free_recruit_banner_data, ids=free_recruit_banner_case)
def test_free_recruit_case(self, param):
r = feed_request().free_recruit_banner(param["version"], param["json"])
if r["error"] == 0:
assert r["data"]["banner"] != param["assert"]
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 TestFreeRecruitList:
data = BaseRequest().api_load(path_setting.FREE_RECRUIT_LIST)
free_recruit_list_case, free_recruit_list_data = get_ids(data, "free_recruit_list")
@pytest.mark.parametrize("param", free_recruit_list_data, ids=free_recruit_list_case)
def test_free_recruit_list(self, param):
r = feed_request().free_recruit_list(param["version"], param["json"], param["tab_type"], param["page"],param["size"])
if r["error"] == 0:
assert r["data"]["free_recruits"] != param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.gmai_request import gmai_request
# 测肤结果页
class TestSkinUserHadTest:
data = BaseRequest().api_load(path_setting.GMAI_SKIN_USER_HAD_TEST_DATA)
skinhadtest_case, skinhadtest_data = get_ids(data, "skin_user_had_test")
@pytest.mark.parametrize("param", skinhadtest_data, ids=skinhadtest_case)
def test_skin_user_hadused(self, param):
r = gmai_request().skin_user_had_test(param["device_id"])
if r["error"] == 0:
data = r.get("data").get("user_have_scan_skin")
assert data is param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.janus_request import janus_request
class TestBeautyCardDetail:
data = BaseRequest().api_load(path_setting.BEAUTY_CARD_DETAIL)
beauty_card_detail_case, beauty_card_detail_data = get_ids(data, "beauty_card_detail")
@pytest.mark.parametrize("param", beauty_card_detail_data, ids=beauty_card_detail_case)
def test_beauty_card_detail(self, param):
r = janus_request().beauty_card_detail(param["spu_id"], param["sku_id"], param["welfareId"], param["version"], param["current_city_id"], param["lat"], param["lng"])
if r["error"] == 0:
assert len(r["data"]["beautycart_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.janus_request import janus_request
class TestServiceHospital:
data = BaseRequest().api_load(path_setting.SERVICE_HOSPITAL)
service_hospital_case, service_hospital_data = get_ids(data, "service_hospital")
@pytest.mark.parametrize("param", service_hospital_data, ids=service_hospital_case)
def test_service_hospital(self, param):
r = janus_request().service_hospital(param["offset"], param["sku_id"], param["size"], param["version"], param["current_city_id"], param["lat"], param["lng"])
if r["error"] == 0:
assert len(r["data"]["service_hospital_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.scan_request import scan_request
# 测颜值底部feed流
class TestScanDiaryCards:
data = BaseRequest().api_load(path_setting.SCAN_DIARY_CARDS_DATA)
scandiarycards_case, scandiarycards_data = get_ids(data, "diary_cards")
@pytest.mark.parametrize("param",scandiarycards_data,ids=scandiarycards_case)
def test_diary_cards(self,param):
r = scan_request().scan_diary_cards(param["current_city_id"], param["page"], param["count"], param["feature_results"],param["feed_type"])
assert r["error"] == 0
assert len(r["data"]) == param["assert_nums"]
\ 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.skin_request import skin_request
# 测肤底部feed流
class TestSkinRecommendServices:
data = BaseRequest().api_load(path_setting.SKIN_RECOMMEND_SERVICE_DATA)
skin_recommend_service_case, skin_recommend_service_data = get_ids(data, "recommend_service")
@pytest.mark.parametrize("param",skin_recommend_service_data,ids=skin_recommend_service_case)
def test_recommend_services(self,param):
r = skin_request().skin_recommend_service(param["device_id"], param["current_city_id"], param["appeal_tag_ids"],
param["offset"], param["size"])
if r["error"] == 0:
services = r["data"]["services"]
assert len(services) == param["assert_nums"]
plastic_feeds:
-
case: "3D变脸下feed流(高版本)"
tag_id: '2371,2372,2247,3032,2274,2277,2242,2348,2597,2318,2551,2341,2389'
face_id: 9
tag_id_list: '[[845, 498, 497, 494], [880, 484, 3254], [276], [1070, 373, 372, 350], [494, 315], [1293, 1050], [284, 282], [254, 251], [1000, 494, 312], [295, 272, 253], [1376, 1365, 1088, 892, 395, 385], [427, 327], [3214, 1377, 1306, 1051, 327, 229]]'
page_size: 10
version: "7.44.0"
assert_num: 10
-
case: "3D变脸下feed流(低版本)"
tag_id: '2371,2372,2247,3032,2274,2277,2242,2348,2597,2318,2551,2341,2389'
face_id: 9
tag_id_list: '[[845, 498, 497, 494], [880, 484, 3254], [276], [1070, 373, 372, 350], [494, 315], [1293, 1050], [284, 282], [254, 251], [1000, 494, 312], [295, 272, 253], [1376, 1365, 1088, 892, 395, 385], [427, 327], [3214, 1377, 1306, 1051, 327, 229]]'
page_size: 10
version: "7.33.0"
assert_num: 10
\ No newline at end of file
free_recruit_banner:
#社区免费招募活动列表背景图片
-
case: "免费招募活动列表背景图片"
version: "7.44.0"
assert: null
json: ""
free_recruit_list:
#社区招募活动列表
-
case: "免费招募活动列表"
version: "7.44.0"
assert: null
json: ""
tab_type: 1
page: 1
size: 10
skin_user_had_test:
-
case: "验证用户是否使用过测肤功能"
device_id: "androidid_7255c3398845cdd5"
assert: True
\ No newline at end of file
beauty_card_detail:
#次卡商详页
-
case: "次卡商详页spuid=100018"
assert: 0
spu_id: 100018
sku_id: 10046
welfareId: 100018
version: 7.44.0
current_city_id: beijing
lat: 40.001879
lng: 116.487194
-
case: "次卡商详页spuid=100021"
assert: 0
spu_id: 100021
sku_id: 10159
welfareId: 100021
version: 7.44.0
current_city_id: beijing
lat: 40.001879
lng: 116.487194
service_hospital:
#次卡商详页-适用机构列表
-
case: "次卡适用机构列表spuid=100018"
assert: 0
offset: 0
sku_id: 10046
size: 1
version: 7.44.0
current_city_id: beijing
lat: 40.001879
lng: 116.487194
diary_cards:
-
case: "测颜值底部feed流"
current_city_id: "beijing"
page: 1
count: 10
feature_results: '["细凤眼","眼距过宽","双眼皮","一字眉","流畅","厚唇","宽鼻翼","重度眼袋","尖下巴","无法令纹","娃娃脸",""]'
feed_type: 1
assert_nums: 10
\ No newline at end of file
recommend_service:
-
case: "测肤底部feed流"
current_city_id: "beijing"
offset: 0
size: 10
appeal_tag_ids: '[2306,2303,2551,2355,2322,2337]'
device_id: "androidid_7255c3398845cdd5"
assert_nums: 10
\ No newline at end of file
......@@ -2,7 +2,7 @@ reply_create:
- assert1: null
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-06-16 16:18:35
content: ces测试+2021-06-18 15:20:57
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web2_request import web2_request
class TestArtemisAdAddShoppingCartInfo:
data = BaseRequest().api_load(path_setting.ADADDSHOPPINGCARTINFO)
adaddshoppingcartinfo_case, adaddshoppingcartinfo_data = get_ids(data, "artemis_ad_add_shopping_cart_info")
@pytest.mark.parametrize("param",adaddshoppingcartinfo_data,ids=adaddshoppingcartinfo_case)
def test_artemis_ad_add_shopping_cart_info(self, param):
'''我的购物车列表'''
r = web2_request().artemis_ad_add_shopping_cart_info()
if r["error"] == 0:
data = r.get("data").get("data", [])
assert len(data) >= param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request
class TestArtemisAdTypeList:
data = BaseRequest().api_load(path_setting.ADTYPELIST)
adtypelist_case, adtypelist_data = get_ids(data, "artemis_ad_type_list")
@pytest.mark.parametrize("param",adtypelist_data,ids=adtypelist_case)
def test_artemis_ad_type_list(self, param):
'''服务资源列表'''
r = web_request().artemis_ad_type_list()
if r["error"] == 0:
adtypes = r.get("data").get("adtypes", [])
assert len(adtypes) >= param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request
class TestArtemisOrderList:
data = BaseRequest().api_load(path_setting.ORDERLIST)
orderlist_case, orderlist_data = get_ids(data, "artemis_order_list")
@pytest.mark.parametrize("param",orderlist_data,ids=orderlist_case)
def test_artemis_order_list(self, param):
'''我的服务订单'''
r = web_request().artemis_order_list(param["status"])
if r["error"] == 0:
orders = r.get("data").get("orders", [])
assert len(orders) >= param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request
class TestCpcHomepage:
data = BaseRequest().api_load(path_setting.CPCHOMEPAGE)
cpchomepage_case, cpchomepage_data = get_ids(data, "cpc_homepage")
@pytest.mark.parametrize("param",cpchomepage_data,ids=cpchomepage_case)
def test_cpc_homepage(self, param):
'''点点通-概览'''
r = web_request().cpc_homepage()
if r["error"] == 0:
if r["data"]["account"] <= "0":
assert r["data"]["is_cpc"] == param["assert"]
else:
assert r["data"]["is_cpc"] == param["assert1"]
artemis_ad_add_shopping_cart_info:
#我的购物车case
-
case: "我的购物车"
assert: 0
artemis_ad_type_list:
#服务资源case
-
case: "服务资源"
assert: 0
assert_account: 0
assert1: True
artemis_order_list:
#我的服务订单case
-
case: "我的服务订单请求失败case"
status: ""
assert: 0
-
case: "我的服务订单-待支付广告包case"
status: 0
assert: 0
-
case: "我的服务订单-已购买case"
status: 1
assert: 0
-
case: "我的服务订单-待审核case"
status: 2
assert: 0
-
case: "我的服务订单-待上线case"
status: 3
assert: 0
-
case: "我的服务订单-上线中case"
status: 4
assert: 0
-
case: "我的服务订单-已下线case"
status: 5
assert: 0
-
case: "我的服务订单-已支付广告包case"
status: 6
assert: 0
-
case: "我的服务订单-已关闭广告包case"
status: 7
assert: 0
cpc_homepage:
#点点通商品-概览case
-
case: "点点通商品概览"
#doctor_user_id: "602329"
assert: False
assert_account: 0
assert1: True
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