Commit 3fb19d9c authored by 林颖's avatar 林颖

Merge branch 'common_dev' of http://git.wanmeizhensuo.com/dengyingying/backend_auto into ly_dev

已跑过能跑通
# Conflicts:
#	path_setting.py
parent 6cfc9cd2
......@@ -13,9 +13,16 @@ class conversation_request(BaseRequest):
self.params["message_ids"] = message_ids
return self.api_send(self.messageread["message_read"])
def detail_messageid(self, os_version, last_msg_id, offset_msg_id):
self.params["os_version"] = os_version
self.params["last_msg_id"] = last_msg_id
self.params["offset_msg_id"] = offset_msg_id
return self.api_send(self.messageread["detail_messageid"])
if __name__ == '__main__':
print(conversation_request().message_read("beijing", 1,'[10622,10626,10646,10651]'))
print(conversation_request().detail_messageid(10, 0, 0))
......
......@@ -9,4 +9,16 @@ message_read:
message_ids: ${message_ids}
json: {}
isLogin: 1 #需要登录的接口
\ No newline at end of file
isLogin: 1 #需要登录的接口
detail_messageid:
method: get
url: /api/conversation/detail/602329_33910245/
params:
os_version: ${os_version}
last_msg_id: ${last_msg_id}
offset_msg_id: ${offset_msg_id}
data: {}
json: {}
isLogin: 1 #需要登录的接口
import path_setting
from in_common.base_request import BaseRequest
class filter_request(BaseRequest):
def __init__(self):
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
return self.api_send(self.data["service_home_city_v2"])
if __name__ == '__main__':
#城市筛选器
print(filter_request().service_home_city_v2("", "40.002", "116.487252"))
print("fgx")
service_home_city_v2:
method: GET
url: /api/filter/service_home_city_v2
params:
current_city_id: ${current_city_id}
lat: ${lat}
lng: ${lng}
data: {}
json: {}
import path_setting
from in_common.base_request import BaseRequest
class hybrid_get_gift_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.HYBRID_GET_GIFT_CONFIG)
#商祥页-美券列表
def get_gift_data(self, gift_id):
self.params["gift_id"] = gift_id
return self.api_send(self.data["get_gift_data"])
if __name__ == '__main__':
#打印商祥页-优惠券列表-领取
print(hybrid_get_gift_request().get_gift_data("63302"))
\ No newline at end of file
#商祥页-优惠券列表-领取
get_gift_data:
method: post
url: /hybrid/get_gift/_data
params: {}
data:
gift_id: ${gift_id}
json: {}
isLogin: 1
\ No newline at end of file
import path_setting
from in_common.base_request import BaseRequest
from bs4 import BeautifulSoup
class hybrid_request(BaseRequest):
def __init__(self):
#百科详情页-项目聚合百科
self.data = self.api_load(path_setting.SUBWIKI_CONFIG)
#百科详情页-项目百科
self.data = self.api_load(path_setting.BASEWIKI_ITEM_CONFIG)
#百科详情页-药品(仪器、材料)百科
self.data = self.api_load(path_setting.BASEWIKI_PRODUCT_CONFIG)
#百科详情页-品牌百科
self.data = self.api_load(path_setting.BRAND_CONFIG)
#百科详情页-项目聚合百科
def sub_wiki(self, version, current_city_id, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
self.params['current_city_id'] = current_city_id
self.params['version'] = version
return self.api_send(self.data['sub_wiki'])
# return self.data
#百科详情页-项目百科
def basewiki_item(self, version, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
self.params['version'] = version
return self.api_send(self.data['basewiki_item'])
#百科详情页-药品(仪器、材料)百科
def basewiki_product(self, version, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
self.params['version'] = version
return self.api_send(self.data['basewiki_product'])
#百科详情页-品牌百科
def brand(self, version, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
self.params['version'] = version
return self.api_send(self.data['brand'])
if __name__ == '__main__':
# print(self.data)
# print(hybrid_request().sub_wiki("744.0", "beijing"))
# print(type(hybrid_request().sub_wiki("744.0", "beijing")))
soup = BeautifulSoup(hybrid_request().sub_wiki("744.0", "beijing"), 'lxml') # html.parser是解析器,也可是lxml
print(soup.prettify(),'百科详情页-项目聚合百科') #输出soup对象的内容
print(soup.title)
\ No newline at end of file
#百科详情页-项目聚合百科-玻尿酸
sub_wiki:
method: GET
url: /hybrid/sub_wiki/127
params:
current_city_id: ${current_city_id}
version: ${version}
data: {}
json: {}
#百科详情页-项目百科-水光针
basewiki_item:
method: GET
url: /hybrid/base_wiki/item/141
params:
version: ${version}
data: {}
json: {}
#百科详情页-药品(仪器、材料)百科-菲洛嘉
basewiki_product:
method: GET
url: /hybrid/base_wiki/product/16
params:
version: ${version}
data: {}
json: {}
#百科详情页-品牌百科-德玛莎
brand:
method: GET
url: /hybrid/brand/98
params:
version: ${version}
data: {}
json: {}
\ No newline at end of file
......@@ -4,7 +4,10 @@ from in_common.base_request import BaseRequest
class janus_request(BaseRequest):
def __init__(self):
#捜索结果页-综合/百科tab
self.data = self.api_load(path_setting.CONTENTV7_CONFIG)
#医院主页捜索
self.data = self.api_load(path_setting.HOSPITALSEARCH_CONFIG)
#品类聚合页面商品列表
......@@ -13,6 +16,9 @@ class janus_request(BaseRequest):
#品类聚合页面标签和专场
self.data = self.api_load(path_setting.POLYMER_CONFIG)
#医生医院sug列表
self.data = self.api_load(path_setting.KEYWORDTIP_CONFIG)
#搜索结果页-综合/百科tab
def content_v7(self, query, device_id, current_city_id, version, is_first, tab_type, offset):
#搜索词
......@@ -89,6 +95,21 @@ class janus_request(BaseRequest):
return self.api_send(self.data["polymer"])
#医生医院sug列表
def keyword_tip(self, query, lat, lng, version, device_id = '97B6764B-2135-4761-9911-701C38CBC272', tab_type = '0'):
self.params['query'] = query
self.params['lat'] = lat
self.params['lng'] = lng
self.params['version'] = version
return self.api_send(self.data['keyword_tip'])
# 新版本我的美券列表
def product_my_list(self,start_num,tab_id):
self.params['start_num'] = start_num
self.params['tab_id'] = tab_id
return self.api_send(self.data['coupon_my_list'])
if __name__ == '__main__':
#打印购物车-猜你喜欢列表接口返回
......@@ -106,4 +127,4 @@ if __name__ == '__main__':
print(janus_request().polymer())
print("fgx")
print(janus_request().product_my_list(0, 0))
\ No newline at end of file
......@@ -84,8 +84,27 @@ polymer:
data: { }
json: { }
#医生医院sug列表
keyword_tip:
method: GET
url: /api/janus/search/keyword/tip
params:
query: ${query}
lat: ${lat}
lng: ${lng}
version: ${version}
data: {}
json: {}
#新版本我的美券
coupon_my_list:
method: get
url: /api/janus/product/coupon/my_list
params:
start_num: ${start_num}
tab_id: ${tab_id}
isLogin: 1
import path_setting
from in_common.base_request import BaseRequest
class orders_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.ORDERS_MY_V2_CONFIG)
# 我的订单列表
def my_v2(self,start_num,status,version):
self.params["start_num"] = start_num
self.params["status"] = status
self.params["version"] = version
return self.api_send(self.data["my_v2"])
if __name__ == '__main__':
print(orders_request().my_v2(0,1,"7.44.0"))
my_v2:
method: get
url: /api/orders/my/v2
params:
start_num: ${start_num}
status: ${status}
version: ${version}
isLogin: 1
import path_setting
from in_common.base_request import BaseRequest
class pay_request(BaseRequest):
def __init__(self):
self.wechat_pay = self.api_load(path_setting.WECHAT_PAY)
def wechat_prepay(self, settlement_id):
self.params["settlement_id"] = settlement_id
return self.api_send(self.wechat_pay["wechat_prepay"])
def alipay_prepay(self, settlement_id, version,is_huabei,huabei_period):
self.params["settlement_id"] = settlement_id
self.params["version"] = version
self.params["is_huabei"] = is_huabei
self.params["huabei_period"] = huabei_period
return self.api_send(self.preview["pay_v1"])
def jump(self,ee,settlement_id):
self.params["settlement_id"] = settlement_id
return self.api_send(self.preview["create_v1"])
if __name__ == '__main__':
# print(settlement_request().preview_v1("beijing", "599428", 1, 1, 1, "true", 0))
print(pay_request().wechat_prepay(522139664651))
\ No newline at end of file
wechat_prepay:
method: post
url: /pay/wechat/prepay
params:
current_city_id: "beijing"
version: 7.44.0
data:
settlement_id: ${settlement_id}
isLogin: 1
......@@ -4,8 +4,12 @@ from in_common.base_request import BaseRequest
class search_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.KEYWORDS_CONFIG)
#品类聚合页面医生tab列表
self.data = self.api_load(path_setting.HOSPITAL_CONFIG)
self.data = self.api_load(path_setting.KEYWORDS_CONFIG) #keywords路径
self.data = self.api_load(path_setting.CONTENTV6_CONFIG) #content_v6路径
self.data = self.api_load(path_setting.HOT_CONFIG) # hot路径
#搜索首页-热门搜索模块(点击搜索框即调接口)
def keywords(self,current_city_id,search_tab):
......@@ -31,4 +35,24 @@ class search_request(BaseRequest):
self.params['offset'] = offset
# 请求的size
self.params['size'] = size
return self.api_send(self.data["content_v6"])
\ No newline at end of file
return self.api_send(self.data["content_v6"])
# 搜索首页-更美热门榜模块(点击搜索框即调接口)
def hot(self, version, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
self.params["version"] = version
return self.api_send(self.data["hot"])
# 品类聚合页面医生tab列表
def hospital(self, cp_id, tag_id, q, count, device_id):
self.params["cp_id"] = cp_id
self.params["tag_id"] = tag_id
self.params["q"] = q
self.params["count"] = count
self.params["device_id"] = device_id
return self.api_send(self.data["hospital"])
if __name__ == '__main__':
# 打印购物车-猜你喜欢列表接口返回
print(search_request().hospital(82, [], "眼部整形", 10, "869378034450718"))
#搜索首页-热门搜索模块(点击搜索框即调接口)
keywords:
method: get
#接口地址
......@@ -9,6 +10,7 @@ keywords:
data: {}
json: {}
#搜索结果页-医生/医院tab
content_v6:
method: get
#接口地址
......@@ -24,4 +26,26 @@ content_v6:
offset: ${offset}
size: ${size}
data: {}
json: {}
# 搜索首页-更美热门榜模块(点击搜索框即调接口)
hot:
method: get
#接口地址
url: /api/search/hot
#列出所有定义函数时的参数
params:
version: ${version}
#品类聚合页面医生tab列表
hospital:
method: get
url: /api/search/v2/hospital
params:
cp_id: ${cp_id}
tag_id: ${tag_id}
q: ${q}
count: ${count}
device_id: ${device_id}
data: {}
json: {}
\ No newline at end of file
import path_setting
from in_common.base_request import BaseRequest
class settlement_request(BaseRequest):
def __init__(self):
self.preview = self.api_load(path_setting.PREVIEW_V1)
def preview_v1(self, current_city_id, service_item_id, number, use_platform_coupon, use_doctor_coupon, use_coupon_grey, is_create_groupbuy):
self.params["current_city_id"] = current_city_id
self.params["service_item_id"] = service_item_id
self.params["number"] = number
self.params["use_platform_coupon"] = use_platform_coupon
self.params["use_doctor_coupon"] =use_doctor_coupon
self.params["use_coupon_grey"] = use_coupon_grey
self.params["is_create_groupbuy"] = is_create_groupbuy
return self.api_send(self.preview["preview_v1"])
def pay_v1(self, actual_pay, payment_final_price, is_contains_groupbuy_order,mul_orders_number):
self.params["actual_pay"] = actual_pay
self.params["payment_final_price"] = payment_final_price
self.params["is_contains_groupbuy_order"] = is_contains_groupbuy_order
self.params["mul_orders_number"] = mul_orders_number
return self.api_send(self.preview["pay_v1"])
def create_v1(self,service_item_id, number,platform_coupon_id,use_point,is_doctor_see,doctor_coupon_id,insurance_info,is_create_groupbuy):
self.params["service_item_id"] = service_item_id
self.params["number"] = number
self.params["platform_coupon_id"] = platform_coupon_id
self.params["use_point"] = use_point
self.params["is_doctor_see"] = is_doctor_see
self.params["doctor_coupon_id"] = doctor_coupon_id
self.params["insurance_info"] = insurance_info
self.params["is_create_groupbuy"] = is_create_groupbuy
return self.api_send(self.preview["create_v1"])
def pay(self,id):
self.params["id"] = id
return self.api_send(self.preview["pay"])
if __name__ == '__main__':
# print(settlement_request().preview_v1("beijing", "599428", 1, 1, 1, "true", 0))
print(settlement_request().create_v1(599428, 1, "", 0,1, "", [], 0))
\ No newline at end of file
preview_v1:
method: post
url: /api/settlement/preview/v1
params:
current_city_id: ${current_city_id}
data:
service_item_id: ${service_item_id}
number: ${number}
use_platform_coupon: ${use_platform_coupon}
use_doctor_coupon: ${use_doctor_coupon}
use_coupon_grey: ${use_coupon_grey}
is_create_groupbuy: ${is_create_groupbuy}
json: {}
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
pay_v1:
method: get
url: /api/settlement/pay/v1
params:
current_city_id: "beijing"
actual_pay: ${actual_pay}
payment_final_price: ${payment_final_price}
is_contains_groupbuy_order: ${is_contains_groupbuy_order}
mul_orders_number: ${mul_orders_number}
data: {}
json: {}
isLogin: 1
create_v1:
method: post
url: /api/settlement/create/v1
params:
current_city_id: "beijing"
version: 7.44.0
data:
service_item_id: ${service_item_id}
number: ${number}
phone: "18301089978"
platform_coupon_id: ${platform_coupon_id}
use_point: ${use_point}
is_doctor_see: ${is_doctor_see}
doctor_coupon_id: ${doctor_coupon_id}
insurance_info: ${insurance_info}
is_create_groupbuy: ${is_create_groupbuy}
isLogin: 1
pay:
method: get
url: /api/settlement/pay
params:
current_city_id: "beijing"
id: ${id}
version: 7.44.0
data: {}
isLogin: 1
import path_setting
from in_common.base_request import BaseRequest
class visual_beauty_card_request(BaseRequest):
def __init__(self):
#自定义专题-更美次卡橱窗组件商品
self.data = self.api_load(path_setting.VISUAL_BEAUTY_CARD_SERVICES_CONFIG)
#自定义专题-更美次卡商品列表筛选器
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'):
self.params["unit_id"] = unit_id
self.params["current_city_id"] = current_city_id
self.params["page"] = page
self.params["page_size"] = page_size
self.params["version"] = version
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'):
self.params["unit_id"] = unit_id
self.params["current_city_id"] = current_city_id
self.params["version"] = version
return self.api_send(self.data['beautycard_filters'])
#自定义专题-更美次卡商品列表组件商品
def beautycard_skus(self, unit_id, tag_id, area, sort_type, page, page_size, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
self.params["unit_id"] = unit_id
self.params["tag_id"] = tag_id
self.params["area"] = area
self.params["sort_type"] = sort_type
self.params["page"] = page
self.params["page_size"] = page_size
return self.api_send(self.data['beautycard_skus'])
\ No newline at end of file
visual_beauty_card_services:
method: GET
url: /api/janus/visual_beauty_card/services
params:
#组件id
unit_id : ${unit_id}
current_city_id : ${current_city_id}
#分页
page : ${page}
#分页大小
page_size : ${page_size}
version : ${version}
data: {}
json: {}
beautycard_filters:
method: GET
url: /api/janus/visual_beauty_card/list_unit/filters
params:
#组件id
unit_id : ${unit_id}
current_city_id : ${current_city_id}
version : ${version}
data: {}
json: {}
beautycard_skus:
method: GET
url: /api/janus/visual_beauty_card/list_unit/skus
params:
#组件id
unit_id : ${unit_id}
#类型筛选器(-1: 全部类型)
tag_id : ${tag_id}
#城市筛选器
area : ${area}
#排序方式(0: 默认排序, 1: 销量排序, 2: 价格排序, 3: 上架时间排序)
sort_type : ${sort_type}
#分页
page : ${page}
#分页大小
page_size : ${page_size}
data: {}
json: {}
import path_setting
from in_common.base_request import BaseRequest
class glmer_request(BaseRequest):
def __init__(self):
self.REGISTER_URL = self.api_load(path_setting.REGISTER_URL)
def service_register(self,name,project_type,upgrade,short_description,doctor_id,start_time,end_time,photo_details,image_header,video_token,service_type,is_specialreview,reservation,have_extra_pay,is_draft,items,csrfmiddlewaretoken):
self.params["name"] = name
self.params["project_type"] = project_type
self.params["upgrade"] = upgrade
self.params["short_description"] = short_description
self.params["doctor_id"] = doctor_id
self.params["start_time"] = start_time
self.params["end_time"] = end_time
self.params["photo_details"] = photo_details
self.params["image_header"] = image_header
self.params["video_token"] = video_token
self.params["service_type"] = service_type
self.params["is_specialreview"] = is_specialreview
self.params["reservation"] = reservation
self.params["have_extra_pay"] = have_extra_pay
self.params["is_draft"] = is_draft
self.params["items"] = items
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
return self.api_send(self.REGISTER_URL["service_register"])
def service_detail(self) :
return self.api_send(self.REGISTER_URL["service_detail"])
def tag_properties(self,catalog_ids):
#我的商品-编辑可标准化商品
self.params["catalog_ids"] = catalog_ids
return self.api_send(self.REGISTER_URL["tag_properties"])
if __name__ == '__main__':
print(glmer_request().service_register("激光溶脂瘦脸", "[236]", "true", "测试", "wangyang", "1624377600", "1627660800", "<p>12</p>", "https://heras.igengmei.com/service/2021/06/01/0b9b110e60", "UPCOYIJkZOMcdd9FDzpBqYjzWUh55fBpVi3AhWpL:nBdvXYz_CR7wNcuroo3TLyvuQiY=:eyJzY29wZSI6InZpZGVvIiwiZGVhZGxpbmUiOjE2MjI1MTg2NTd9", "0", "false", "1", "false", "0", '[{"gengmei_price":100,"original_price":200,"is_online":true}]',"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(glmer_request().service_detail())
print(glmer_request().tag_properties("[115,141]"))
service_register:
method: POST
url: /api/glmer/service/register
params: {}
data:
name: ${name}
project_type: ${project_type}
upgrade: ${upgrade}
short_description: ${short_description}
doctor_id: ${doctor_id}
start_time: ${start_time}
end_time: ${end_time}
photo_details: ${photo_details}
image_header: ${image_header}
video_token: ${video_token}
service_type: ${service_type}
is_specialreview: ${is_specialreview}
reservation: ${reservation}
have_extra_pay: ${have_extra_pay}
is_draft: ${is_draft}
items: ${items}
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
phone_num: ${phone_num}
vfc_code: ${vfc_code}
face_token: ${face_token}
json: {}
isLogin: 1
service_detail:
method: get
url: /api/glmer/service/detail/5885425
params: {}
data: {}
json: {}
isLogin: 1
tag_properties:
method: get
url: /api/glmer/tag/properties
params:
catalog_ids: ${catalog_ids}
data: {}
json: {}
isLogin: 1
......@@ -8,6 +8,7 @@ class web2_request(BaseRequest):
# self.SERVICE_REVIEW_URL = self.api_load(path_setting.SERVICE_REVIEW_URL)
def service_list(self, page,pagesize,is_online,extra_filter_choice):
#我的商品查询列表
self.params["page"] = page
self.params["pagesize"] = pagesize
self.params["is_online"] = is_online
......@@ -15,25 +16,34 @@ class web2_request(BaseRequest):
return self.api_send(self.SERVICE_URL["service_list"])
def service_review_list(self,page,pagesize,type):
#商品审核查询列表
self.params["page"] = page
self.params["pagesize"] = pagesize
self.params["type"] = type
return self.api_send(self.SERVICE_URL["service_review_list"])
def servicereview_option(self,id, type,csrfmiddlewaretoken):
#商品审核-撤回审核、取消申请
self.params["id"] = id
self.params["type"] = type
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
return self.api_send(self.SERVICE_URL["servicereview_option"])
def tag_all(self) :
#发布商品-选择类目跳转发布商品页面tag接口
return self.api_send(self.SERVICE_URL["tag_all"])
def service_delete(self,is_delete,service_register_id,csrfmiddlewaretoken):
#我的商品-删除商品
self.params["is_delete"] = is_delete
self.params["service_register_id"] = service_register_id
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
return self.api_send(self.SERVICE_URL["service_delete"])
if __name__ == '__main__':
print(web2_request().service_list("1", "10", "-1", "-1"))
print(web2_request().service_review_list("1", "10", "0"))
print(web2_request().servicereview_option("209989", "1", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web2_request().tag_all())
\ No newline at end of file
print(web2_request().tag_all())
print(web2_request().service_delete("1","209863","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
......@@ -50,4 +50,15 @@ tag_all:
param: {}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
isLogin: 1
service_delete:
method: POST
url: /api/web2/service/delete
param: {}
data:
is_delete: ${is_delete}
service_register_id: ${service_register_id}
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
json: {}
isLogin: 1
......@@ -4,21 +4,51 @@ from in_common.base_request import BaseRequest
class web_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.ACCOUNT_URL)
self.ACCOUNT_URL = self.api_load(path_setting.ACCOUNT_URL)
def account_unreadbadgecount(self) :
return self.api_send(self.data["account_unreadbadgecount"])
return self.api_send(self.ACCOUNT_URL["account_unreadbadgecount"])
def article_videotoken(self) :
return self.api_send(self.data["article_videotoken"])
return self.api_send(self.ACCOUNT_URL["article_videotoken"])
def doctor_submechanisms(self) :
return self.api_send(self.data["doctor_submechanisms"])
return self.api_send(self.ACCOUNT_URL["doctor_submechanisms"])
def service_offline(self,id,csrfmiddlewaretoken):
self.params["id"] = id
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
return self.api_send(self.ACCOUNT_URL["service_offline"])
def conversation(self, is_star, page):
self.params["is_star"] = is_star
self.params["page"] = page
return self.api_send(self.ACCOUNT_URL["conversation"])
def conversation_unread_list(self, page):
self.params["page"] = page
return self.api_send(self.ACCOUNT_URL["conversation_unread_list"])
def service(self):
return self.api_send(self.ACCOUNT_URL["service"])
def conversation_diary(self, doctor_user_id):
self.params["doctor_user_id"] = doctor_user_id
return self.api_send(self.ACCOUNT_URL["conversation_diary"])
def conversation_coupon(self, doctor_user_id):
self.params["doctor_user_id"] = doctor_user_id
return self.api_send(self.ACCOUNT_URL["conversation_coupon"])
if __name__ == '__main__':
print(web_request().account_unreadbadgecount())
print(web_request().article_videotoken())
print(web_request().doctor_submechanisms())
print(web_request().service_offline("209992", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web_request().conversation(0, 1))
print(web_request().conversation_unread_list(1))
print(web_request().service())
print("发送")
print(web_request().conversation_diary(602329))
print(web_request().conversation_coupon(602329))
......@@ -25,3 +25,59 @@ doctor_submechanisms:
data: {}
json: {}
isLogin: 1
service_offline:
method: post
url: /api/web/service/offline
param: {}
data:
id: ${id}
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
json: {}
isLogin: 1
conversation:
method: get
url: /api/web/conversation
params:
is_star: ${is_star}
page: ${page}
data: {}
json: {}
isLogin: 1 #需要登录
conversation_unread_list:
method: get
url: /api/web/conversation/unread_list
params:
page: ${page}
data: {}
json: {}
isLogin: 1 #需要登录
service:
method: get
url: /api/web/service
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
conversation_diary:
method: get
url: /api/web/conversation/diary
params:
doctor_user_id: ${doctor_user_id}
data: {}
json: {}
isLogin: 1 #需要登录
conversation_coupon:
method: get
url: /api/web/conversation/coupon
params:
doctor_user_id: ${doctor_user_id}
data: {}
json: {}
isLogin: 1 #需要登录
develop_host:
backend: http://backend.paas-develop.env
# doctor: http://doctor.paas-develop.env
doctor: http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
......@@ -69,10 +69,18 @@ class BaseRequest:
# headers=user_headers,
data=req.get('data'),
json=req.get('json'),
# verify=False
# proxies={"http":"172.30.9.226:8888"}
)
return r.json()
try:
content_type = r.headers.get("content-type").split(";")[0]
except:
content_type = "application/json"
if content_type == 'application/json':
return r.json()
return r.text
# 随机生成trace_id
def trace_id(self):
......
......@@ -31,7 +31,8 @@ class LoginFunction:
url=url,
params=self.params["backend_login"]["params"],
data=self.params["backend_login"]["data"],
headers={'Connection': 'close'}
headers={'Connection': 'close'},
# verify=False
)
return s
......
......@@ -9,6 +9,16 @@ backend_login:
vfc_type:
face_token:
#backend_login:
# method: POST
# url: /api/accounts/login/password
# params:
# current_city_id: "beijing"
# data:
# phone: "+8618646292152"
# password: 111111
doctor_login:
method: post
url: /api/web/account/login
......
This diff is collapsed.
......@@ -14,7 +14,7 @@ class TestThirdPhoneLogin:
def test_thirdphone_login(self,param):
r = thirdphonelogin_request().thirdphone_login(param["version"],param["phone_data"],param["phone_from_type"])
print('______',r)
if r["error"] == 1:
assert r['message'] == 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.conversation_request import conversation_request
class TestDetailMessageid:
data = BaseRequest().api_load(path_setting.DETAIL_MESSAGEID)
detailmessageid_case, detailmessageid_data = get_ids(data, "detail_messageid")
@pytest.mark.parametrize("param",detailmessageid_data,ids=detailmessageid_case)
def test_detail_messageid(self,param):
r = conversation_request().detail_messageid(param["os_version"], param["last_msg_id"], param["offset_msg_id"])
if r["error"] == 0:
results = r.get("data").get("results", [])
assert len(results) <= param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
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")
@pytest.mark.parametrize("param", servicehomecityv2_data, ids=servicehomecityv2_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
import pytest
from bs4 import BeautifulSoup
import path_setting
from all_backend_api.hybrid_request import hybrid_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#百科详情页-项目百科,水光针
class TestBaseWikiItem:
data = BaseRequest().api_load(path_setting.BASEWIKI_ITEM)
basewiki_item_case, basewiki_item_data = get_ids(data, "basewiki_item")
@pytest.mark.parametrize("param", basewiki_item_data, ids=basewiki_item_case)
def test_basewiki_item(self, param):
r = hybrid_request().basewiki_item(param["version"])
soup = BeautifulSoup(r, 'lxml') # html.parser是解析器,也可是lxml
assert soup.title.string == param["assert"]
print('进入项目百科-水光针的百科详情页')
\ No newline at end of file
import pytest
from bs4 import BeautifulSoup
import path_setting
from all_backend_api.hybrid_request import hybrid_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#百科详情页-药品(仪器、材料)百科,菲洛嘉
class TestBaseWikiProduct:
data = BaseRequest().api_load(path_setting.BASEWIKI_PRODUCT)
basewiki_product_case, basewiki_product_data = get_ids(data, "basewiki_product")
@pytest.mark.parametrize("param", basewiki_product_data, ids=basewiki_product_case)
def test_basewiki_product(self, param):
r = hybrid_request().basewiki_product(param["version"])
soup = BeautifulSoup(r, 'lxml') # html.parser是解析器,也可是lxml
assert soup.title.string == param["assert"]
print('进入项目百科-菲洛嘉的百科详情页')
\ No newline at end of file
import pytest
from bs4 import BeautifulSoup
import path_setting
from all_backend_api.hybrid_request import hybrid_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#百科详情页-品牌百科,得玛莎
class TestBrand:
data = BaseRequest().api_load(path_setting.BRAND)
brand_case, brand_data = get_ids(data, "brand")
@pytest.mark.parametrize("param", brand_data, ids=brand_case)
def test_brand(self, param):
r = hybrid_request().brand(param["version"])
soup = BeautifulSoup(r, 'lxml') # html.parser是解析器,也可是lxml
assert soup.title.string == param["assert"]
print('进入项目百科-得玛莎的百科详情页')
\ No newline at end of file
import pytest
from bs4 import BeautifulSoup
import path_setting
from all_backend_api.hybrid_request import hybrid_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#百科详情页-项目聚合百科,玻尿酸
class TestSubWiki:
data = BaseRequest().api_load(path_setting.SUBWIKI)
subwiki_case, subwiki_data = get_ids(data, "sub_wiki")
@pytest.mark.parametrize("param", subwiki_data, ids=subwiki_case)
def test_sub_wiki(self, param):
r = hybrid_request().sub_wiki(param["version"], param["current_city_id"])
soup = BeautifulSoup(r, 'lxml') # html.parser是解析器,也可是lxml
assert soup.title.string == param["assert"]
print('进入项目聚合百科-玻尿酸的百科详情页')
\ No newline at end of file
import pytest
from all_backend_api.hybrid_get_gift_request import hybrid_get_gift_request
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
class TestGiftListData:
data = BaseRequest().api_load(path_setting.GET_GIFT_DATA)
get_gift_data_case, get_gift_data_data = get_ids(data, "get_gift_data")
@pytest.mark.parametrize("param", get_gift_data_data, ids=get_gift_data_case)
def test_get_gift_data(self, param):
r = hybrid_get_gift_request().get_gift_data(param["gift_id"])
if r["error"] == 1:
assert r["message"] == param["assert_message"]
import pytest
import path_setting
from all_backend_api.janus_request import janus_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#医生医院sug列表
class TestKeywordTip:
data = BaseRequest().api_load(path_setting.KEYWORDTIP)
keywordtip_case, keywordtip_data = get_ids(data, "keyword_tip")
@pytest.mark.parametrize("param", keywordtip_data, ids=keywordtip_case)
def test_keyword_tip(self, param):
print(param['query'])
r = janus_request().keyword_tip(param["query"], param["lat"], param["lng"], param["version"])
if not r["data"]["aggregation_card"]:
print('医生医院卡片信息')
assert r["data"]["tip_keys"][0]["type_flag"] == param["assert1"]
assert r["data"]["tip_keys"][11]["type_flag"] == param["assert2"]
if r["data"]["aggregation_card"] :
print('百科卡片信息')
assert r["data"]["aggregation_card"]["child"][0]["type_flag"] == param["assert1"]
assert r["data"]["tip_keys"][0]["type_flag"] == param["assert2"]
\ No newline at end of file
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 TestProductMyLiSt:
data = BaseRequest().api_load(path_setting.JANUS_PRODUCT_MY_LIST_DATA)
product_my_list_detail_case, product_my_list_detail_data = get_ids(data, "product_my_list")
@pytest.mark.parametrize("param", product_my_list_detail_data, ids=product_my_list_detail_case)
def test_product_my_list(self, param):
r = janus_request().product_my_list(param["start_num"], param["tab_id"])
assert r["error"] == 0
coupon_list = r["data"]["coupon_list"]
print(len(coupon_list))
assert 0 <= len(coupon_list) <= 20
if len(coupon_list) < 10:
assert r["data"]["no_more_data"] is True
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.orders_request import orders_request
class TestOrdersMyV2Waituse:
data = BaseRequest().api_load(path_setting.ORDERS_MY_V2_DATA)
my_order_waituse_case, my_order_waituse_data = get_ids(data, "waituse")
@pytest.mark.parametrize("param",my_order_waituse_data,ids=my_order_waituse_case)
def test_orders_waituse(self,param):
r = orders_request().my_v2(param["start_num"], param["status"], param["version"])
if r["error"] == 0:
orders = r["data"]["orders"]
for order in orders:
# 这个是次卡
if order["type"] == 4:
# 订单信息
order_id = order["order"]["order_id"]
order_status = order["order"]["order_status"]["status"]
order_statust = order["order"]["order_status"]["text"]
gm_url = order["gm_url"]
print(order_id, order_status, order_statust, gm_url)
assert order_status == param["beauty_card_order_status"]
assert order_statust == param["beauty_card_order_statust"]
assert gm_url == param["beauty_card_order_gmurl"].format(order_id)
# 按钮信息,预约
beauty_card_payment_order_wait_used_title = order["buttons"][0]["title"]
beauty_card_payment_order_wait_used_url = order["buttons"][0]["url"]
assert beauty_card_payment_order_wait_used_title == param["beauty_card_button_title"]
assert beauty_card_payment_order_wait_used_url == param["beauty_card_button_gmurl"].format(order_id)
# 7.44.0加的领取面膜按钮
beauty_card_free_service_title = order["buttons"][1]["title"]
assert beauty_card_free_service_title == param["beauty_card_button_mianmo_title"]
# 普通美购订单
if order["type"] == 0:
# 订单信息
order_id = order["order"]["order_id"]
order_status = order["order"]["order_status"]["status"]
order_statust = order["order"]["order_status"]["text"]
assert order_status == param["putong_card_order_status"]
assert order_statust == param["putong_card_order_statust"]
print(order_status, order_statust)
import pytest
import path_setting
from all_backend_api.pay_request import pay_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestWechatPrepay:
data = BaseRequest().api_load(path_setting.WECHARTPAYDATA)
wechart_case, wechart_data = get_ids(data, "wechart_pay")
@pytest.mark.parametrize("param", wechart_data, ids=wechart_case)
def test_wechart_prepay(self, param):
pass
# r = pay_request().wechat_prepay()
# print(r)
# assert r["error"] == param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.search_request import search_request
class TestHospital:
data = BaseRequest().api_load(path_setting.HOSPITAL)
hospital_case, hospital_data = get_ids(data, "hospital")
@pytest.mark.parametrize("param", hospital_data, ids=hospital_case)
def test_hospital(self, param):
r = search_request().hospital(param["cp_id"], param["tag_id"], param["q"], param["count"], param["device_id"])
# print('feng=', r)
if r["error"] == 0:
assert r["data"] != param["assert"]
import pytest
import path_setting
from all_backend_api.search_request import search_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#搜索首页-更美热门榜
class TestHot:
data = BaseRequest().api_load(path_setting.HOT)
hot_case, hot_data = get_ids(data, "hot")
@pytest.mark.parametrize("param", hot_data, ids=hot_case)
def test_hot(self, param):
r = search_request().hot(param["version"])
if r["error"] == 0:
print("接口调用成功了~")
assert len(["data"]) != param["assert"]
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.settlement_request import settlement_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestCreateV1:
data = BaseRequest().api_load(path_setting.CREATE)
create_case, create_data = get_ids(data, "create_v1")
print(create_data)
@pytest.mark.parametrize("param", create_data, ids=create_case)
def test_create_v1(self, param):
r = settlement_request().create_v1(param["service_item_id"],param["number"],param["platform_coupon_id"],param["use_point"],param["is_doctor_see"],param["doctor_coupon_id"],param["insurance_info"],param["is_create_groupbuy"])
print(r)
assert r["error"] == param["assert"]
import pytest
import path_setting
from all_backend_api.settlement_request import settlement_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestPay:
data = BaseRequest().api_load(path_setting.PAY)
pay_case, pay_data = get_ids(data, "pay")
@pytest.mark.parametrize("param", pay_data, ids=pay_case)
def test_pay(self, param):
pay_r = settlement_request().create_v1(param["service_item_id"],param["number"],param["platform_coupon_id"],param["use_point"],param["is_doctor_see"],param["doctor_coupon_id"],param["insurance_info"],param["is_create_groupbuy"])
id = pay_r["data"]["id"]
r = settlement_request().pay(id)
assert r["error"] == param["assert"]
import pytest
import path_setting
from all_backend_api.settlement_request import settlement_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestPayV1:
data = BaseRequest().api_load(path_setting.PAY_V1)
pay_case, pay_data = get_ids(data, "pay_v1")
@pytest.mark.parametrize("param", pay_data, ids=pay_case)
def test_pay_v1(self, param):
r = settlement_request().pay_v1(param["actual_pay"],param["payment_final_price"],param["is_contains_groupbuy_order"],param["mul_orders_number"])
print(r)
assert r["error"] == param["assert"]
import pytest
import path_setting
from all_backend_api.settlement_request import settlement_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestPreviewV1:
data = BaseRequest().api_load(path_setting.PREVIEW)
preview_case, preview_data = get_ids(data, "preview_v1")
@pytest.mark.parametrize("param", preview_data, ids=preview_case)
def test_preview_v1(self, param):
r = settlement_request().preview_v1(param["current_city_id"],param["service_item_id"],param["number"],param["use_platform_coupon"],param["use_doctor_coupon"],param["use_coupon_grey"],param["is_create_groupbuy"])
print(r)
assert r["error"] == param["assert"]
import pytest
import path_setting
from all_backend_api.visual_beauty_card import visual_beauty_card_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#次卡商品列表筛选器接口
class TestBeautyCardFilters:
data = BaseRequest().api_load(path_setting.BEAUTYCARD_FILTERS)
beautycard_filters_case, beautycard_filters_data = get_ids(data, "beautycard_filters")
@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
import pytest
import path_setting
from all_backend_api.visual_beauty_card import visual_beauty_card_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#次卡商品列表组件商品
class TestBeautyCardSkus:
data = BaseRequest().api_load(path_setting.BEAUTYCARD_SKUS)
beautycard_skus_case, beautycard_skus_data = get_ids(data, "beautycard_skus")
@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"])
if r["data"]:
print('次卡商品列表组件有商品召回')
assert len(r["data"]["beautycards"]) != param["assert"]
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.visual_beauty_card import visual_beauty_card_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#次卡橱窗商品
class TestVisualBeautyCardServices:
data = BaseRequest().api_load(path_setting.VISUAL_BEAUTY_CARD_SERVICES)
visual_beauty_card_services_case, visual_beauty_card_services_data = get_ids(data, "visual_beauty_card_services")
@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
login_thirdphone:
- case: "无版本号手机号一键登录case"
-
case: "无版本号手机号一键登录case"
phone_data: '{
"token" : "A4-lVEf_Fk2ekkxSFgSZ59yD6bPaIxHWzJfsGgaEBDrbZzFyxMueOODIoBeXXQuHU8REjG42jvyjQa2a3rkDm8ufKlI8DL3ny2FfxnUrnuQOycWRaHKN3664onbOetr54dvb4wkVaV7X33yBlw7u_ZCNqIOwTnRQ9kPgHDBpvyN4NTdYYf2tJWhF4VeiVOqc7OiRz-Nzt08AUvbtWpw6sPQjA==",
"appId" : "xK5yFMfJ"
......@@ -9,7 +10,8 @@ login_thirdphone:
version:
assert: "获取手机号失败"
- case: "大于7.32手机号一键登录case"
-
case: "大于7.32手机号一键登录case"
phone_data: '{
"token" : "A4-lVEf_Fk2ekkxSFgSZ59yD6bPaIxHWzJfsGgaEBDrbZzFyxMueOODIoBeXXQuHU8REjG42jvyjQa2a3rkDm8ufKlI8DL3ny2FfxnUrnuQOycWRaHKN3664onbOetr54dvb4wkVaV7X33yBlw7u_ZCNqIOwTnRQ9kPgHDBpvyN4NTdYYf2tJWhF4VeiVOqc7OiRz-Nzt08AUvbtWpw6sPQjA==",
"appId" : "xK5yFMfJ"
......@@ -18,7 +20,8 @@ login_thirdphone:
version: "7.43.0"
assert: "获取手机号失败"
- case: "小于7.32手机号一键登录case"
-
case: "小于7.32手机号一键登录case"
phone_data: '{
"token" : "A4-lVEf_Fk2ekkxSFgSZ59yD6bPaIxHWzJfsGgaEBDrbZzFyxMueOODIoBeXXQuHU8REjG42jvyjQa2a3rkDm8ufKlI8DL3ny2FfxnUrnuQOycWRaHKN3664onbOetr54dvb4wkVaV7X33yBlw7u_ZCNqIOwTnRQ9kPgHDBpvyN4NTdYYf2tJWhF4VeiVOqc7OiRz-Nzt08AUvbtWpw6sPQjA==",
"appId" : "xK5yFMfJ"
......
detail_messageid:
#验证成功case
-
case: "私信详情页最新一页的消息内容"
os_version: 10
last_msg_id: 0
offset_msg_id: 0
assert: 20
#城市筛选器
service_home_city_v2:
-
case: "城市筛选器接口"
current_city_id: ""
lat: "40.002"
lng: "116.487252"
assert: 0
basewiki_item:
-
#百科详情页-项目百科,水光针
case: "百科详情页-项目百科,水光针"
version: "744.0"
assert: 水光针
\ No newline at end of file
basewiki_product:
-
#百科详情页-药品(仪器、材料)百科,菲洛嘉
case: "百科详情页-药品(仪器、材料)百科,菲洛嘉"
version: "744.0"
assert: 菲洛嘉
\ No newline at end of file
brand:
-
#百科详情页-品牌百科,得玛莎
case: "百科详情页-品牌百科,得玛莎"
version: "744.0"
assert: 得玛莎
\ No newline at end of file
sub_wiki:
-
#百科详情页-项目聚合百科,玻尿酸
case: "百科详情页-项目聚合百科,玻尿酸"
current_city_id: "beijing"
version: "744.0"
assert: 玻尿酸
\ No newline at end of file
get_gift_data:
-
case: "校验接口返回成功case"
gift_id: "111"
assert_message: "来晚咯,美券已领完!"
\ No newline at end of file
keyword_tip:
-
#输入北京,接口有数据召回且SUG列表召回北京开头的医院信息
case: "输入北京,接口有数据召回且SUG列表召回北京开头的医院信息"
query: "北京"
lat: "39.9"
lng: "116.4"
version: "742.0"
assert1: unknown
assert2: hospital
# -
# #测试环境无法验证该用例
# #输入杨,接口有数据召回且SUG列表召回杨开头的医生信息
# case: "输入杨,接口有数据召回且SUG列表召回杨开头的医生信息"
# query: "杨"
# lat: "39.9"
# lng: "116.4"
# version: "742.0"
# assert1: unknown
# assert2: doctor
-
#输入双眼皮,接口有数据召回且SUG列表召回双眼皮下的项目百科信息
case: "输入双眼皮,接口有数据召回且SUG列表召回双眼皮下的项目百科信息"
query: "双眼皮"
lat: "39.9"
lng: "116.4"
version: "742.0"
assert1: project
assert2: unknown
\ No newline at end of file
product_my_list:
-
case: "未使用美券列表"
start_num: 0
tab_id: 0
-
case: "已使用美券列表"
start_num: 0
tab_id: 1
-
case: "已过期"
start_num: 0
tab_id: 2
\ No newline at end of file
waituse:
#待使用
-
case: "待使用tab"
start_num: 0
status: 1
version: "7.44.0"
beauty_card_order_status : 4
beauty_card_order_statust : "待使用"
beauty_card_order_gmurl : "gengmei://order_beauty_card_detail?order_id={}&type=4"
beauty_card_button_title : "预约服务"
beauty_card_button_gmurl : "gengmei://order_beauty_card_reserve?order_id={}"
beauty_card_button_mianmo_title : "立即领取面膜"
putong_card_order_status : "1"
putong_card_order_statust : "待使用"
\ No newline at end of file
wechart_pay:
-
case: "普通美购订单支付流程--微信支付"
assert: 0
hospital:
#品类聚合页医生tab
-
case: "品类聚合页面医生tab"
assert: null
cp_id: 82
tag_id: []
q: "眼部整形"
count: 10
device_id: 869378034450718
hot:
-
#进入搜索首页-成功调用搜索首页接口
case: "进入搜索首页-成功调用搜索首页接口"
version: "743.0"
assert: 0
create_v1:
-
case: "普通美购下单--获取支付类型接口"
service_item_id: 599428
number: 1
platform_coupon_id: ""
use_point: 0
is_doctor_see: 1
doctor_coupon_id: ""
insurance_info: "[]"
is_create_groupbuy: 0
assert: 0
pay:
-
case: "普通美购下单流程--生成支付金额等信息"
service_item_id: 599428
number: 1
platform_coupon_id: ""
use_point: 0
is_doctor_see: 1
doctor_coupon_id: ""
insurance_info: "[]"
is_create_groupbuy: 0
assert: 0
\ No newline at end of file
pay_v1:
-
case: "普通美购下单流程--获取支付类型接口"
actual_pay: 656
payment_final_price: 2624
is_contains_groupbuy_order: "false"
mul_orders_number: "false"
assert: 0
preview_v1:
-
case: "普通美购下单流程--确认订单页面sucess"
current_city_id: "beijing"
service_item_id: 599428
number: 1
use_platform_coupon: 1
use_doctor_coupon: 1
use_coupon_grey: "true"
is_create_groupbuy: 0
assert: 0
\ No newline at end of file
beautycard_filters:
-
#更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常
case: "更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常"
unit_id: "20109"
current_city_id: "beijing"
version: "743.0"
assert: 0
-
#更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常
case: "更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常"
unit_id: "20113"
current_city_id: "beijing"
version: "743.0"
assert: 0
\ No newline at end of file
beautycard_skus:
-
#更美次卡商品列表组件商品-按SPU导入,商品默认排序
case: "更美次卡商品列表组件商品-按SPU导入,商品默认排序"
unit_id: "20109"
tag_id: "-1"
area: "worldwide"
sort_type: "0"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SKU导入,商品默认排序
case: "更美次卡商品列表组件商品-按SKU导入,商品默认排序"
unit_id: "20113"
tag_id: "-1"
area: "worldwide"
sort_type: "0"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SPU导入,商品价格最低
case: "更美次卡商品列表组件商品-按SPU导入,商品价格最低"
unit_id: "20110"
tag_id: "-1"
area: "worldwide"
sort_type: "2"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SKU导入,商品价格最低
case: "更美次卡商品列表组件商品-按SKU导入,商品价格最低"
unit_id: "20114"
tag_id: "-1"
area: "worldwide"
sort_type: "2"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SPU导入,商品销量最高
case: "更美次卡商品列表组件商品-按SPU导入,商品销量最高"
unit_id: "20111"
tag_id: "-1"
area: "worldwide"
sort_type: "1"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SKU导入,商品销量最高
case: "更美次卡商品列表组件商品-按SKU导入,商品销量最高"
unit_id: "20115"
tag_id: "-1"
area: "worldwide"
sort_type: "1"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SPU导入,商品最新上架
case: "更美次卡商品列表组件商品-按SPU导入,商品最新上架"
unit_id: "20112"
tag_id: "-1"
area: "worldwide"
sort_type: "3"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SKU导入,商品最新上架
case: "更美次卡商品列表组件商品-按SKU导入,商品最新上架"
unit_id: "20116"
tag_id: "-1"
area: "worldwide"
sort_type: "3"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SPU导入,修改城市筛选器为北京,商品正常召回
case: "更美次卡商品列表组件商品-按SPU导入,修改城市筛选器为北京,商品正常召回"
unit_id: "20110"
tag_id: "-1"
area: "beijing"
sort_type: "2"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SKU导入,修改城市筛选器为北京,商品正常召回
case: "更美次卡商品列表组件商品-按SKU导入,修改城市筛选器为北京,商品正常召回"
unit_id: "20115"
tag_id: "-1"
area: "beijing"
sort_type: "1"
page: "0"
page_size: "20"
assert: 0
visual_beauty_card_services:
-
#更美次卡橱窗-按SPU导入,定位北京,商品正常召回
case: "更美次卡橱窗-按SPU导入,定位北京,商品正常召回"
unit_id: "20105"
current_city_id: "beijing"
page: "0"
page_size: "50"
version: "743.0"
assert: 0
-
#更美次卡橱窗-按SKU导入,定位北京,商品正常召回
case: "更美次卡橱窗-按SKU导入,定位北京,商品正常召回"
unit_id: "20106"
current_city_id: "beijing"
page: "0"
page_size: "50"
version: "743.0"
assert: 0
\ No newline at end of file
import pytest
import path_setting
from all_doctor_api.glmer_request import glmer_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestServiceDetail:
service_detail = BaseRequest().api_load(path_setting.DETAIL_DATA)
ServiceDetail_case, ServiceDetail_data = get_ids(service_detail, "service_detail")
@pytest.mark.parametrize("params",ServiceDetail_data,ids=ServiceDetail_case)
def test_ServiceDetail(self,params):
r =glmer_request().service_detail()
print("------",r)
if r["code"] == 0:
assert r["code"] == params["assert"]
import pytest
import path_setting
from all_doctor_api.glmer_request import glmer_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestServiceRegister:
service_register = BaseRequest().api_load(path_setting.REGISTER_DATA)
ServiceRegister_case, ServiceRegister_data = get_ids(service_register, "service_register")
@pytest.mark.parametrize("params",ServiceRegister_data,ids=ServiceRegister_case)
def test_ServiceRegister(self,params):
r =glmer_request().service_register(params['name'],params['project_type'],params['upgrade'],params['short_description'],params['doctor_id'],params['start_time'],params['end_time'],params['photo_details'],params['image_header'],params['video_token'],params['service_type'],params['is_specialreview'],params['reservation'],params['have_extra_pay'],params['is_draft'],params['items'],params['csrfmiddlewaretoken'])
if r["code"] == 0:
assert r["code"] == params["assert"]
# elif r["error"] == 1:
# assert r["message"] == params["assert"]
import pytest
import path_setting
from all_doctor_api.glmer_request import glmer_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestTagProperties:
tag_properties = BaseRequest().api_load(path_setting.PROPERTIES_DATA)
TagProperties_case, TagProperties_data = get_ids(tag_properties, "tag_properties")
@pytest.mark.parametrize("params",TagProperties_data,ids=TagProperties_case)
def test_TagProperties(self,params):
r =glmer_request().tag_properties(params['catalog_ids'])
print("------",r)
if r["error"] == 0:
assert r["error"] == params["assert"]
import pytest
import path_setting
from all_doctor_api.web2_request import web2_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestServiceDelete:
service_delete=BaseRequest().api_load(path_setting.DELETE_DATA)
ServiceDelete_case, ServiceDeletet_data = get_ids(service_delete, "service_delete")
@pytest.mark.parametrize("params", ServiceDeletet_data, ids=ServiceDelete_case)
def test_ServiceDelete(self, params):
r = web2_request().service_delete(params['is_delete'], params['service_register_id'], params['csrfmiddlewaretoken'])
print("======", r)
if r["error"] == 0:
assert r["error"] == params["assert"]
# elif r["error"] == 1:
# assert r["message"] == params["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 TestConversation:
data = BaseRequest().api_load(path_setting.CONVERSATION)
conversation_case, conversation_data = get_ids(data, "conversation")
@pytest.mark.parametrize("param",conversation_data,ids=conversation_case)
def test_conversation(self, param):
'''全部私信列表'''
r = web_request().conversation(param["is_star"], param["page"])
if r["error"] == 0:
conversation = r.get("data").get("conversation", [])
assert len(conversation) <= param["assert"]
assert r["data"]["size"] <= param["assert_size"]
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 TestService:
data = BaseRequest().api_load(path_setting.CONVERSATIONCOUPON)
conversationcoupon_case, conversationcoupon_data = get_ids(data, "conversation_coupon")
@pytest.mark.parametrize("param",conversationcoupon_data,ids=conversationcoupon_case)
def test_conversation_coupon(self, param):
'''发送美券按钮'''
r = web_request().conversation_coupon(param["doctor_user_id"])
if r["error"] == 0:
data1 = r.get("data", [])
assert len(data1) >= 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 TestConversationDiary:
data = BaseRequest().api_load(path_setting.CONVERSATIONDIARY)
conversationdiary_case, conversationdiary_data = get_ids(data, "conversation_diary")
@pytest.mark.parametrize("param",conversationdiary_data,ids=conversationdiary_case)
def test_conversation_diary(self, param):
'''点击发送案例按钮'''
r = web_request().conversation_diary(param["doctor_user_id"])
print(r)
if r["error"] == 0:
data = r.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 TestConversationUnreadList:
data = BaseRequest().api_load(path_setting.CONVERSATIONUNREADLIST)
unreadlist_case, unreadlist_data = get_ids(data, "conversation_unread_list")
@pytest.mark.parametrize("param",unreadlist_data,ids=unreadlist_case)
def test_conversation_unread_list(self, param):
'''未读私信列表'''
r = web_request().conversation_unread_list(param["page"])
if r["error"] == 0:
conversation = r.get("data").get("conversation", [])
assert len(conversation) <= param["assert"]
assert r["data"]["size"] <= param["assert_size"]
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 TestService:
data = BaseRequest().api_load(path_setting.SERVICE)
service_case, service_data = get_ids(data, "service")
@pytest.mark.parametrize("param",service_data,ids=service_case)
def test_service(self, param):
'''未读私信列表'''
r = web_request().service()
if r["error"] == 0:
data = r.get("data").get("data", [])
assert len(data) <= param["assert"]
assert r["data"]["size"] <= param["assert_size"]
import pytest
import path_setting
from all_doctor_api.web_request import web_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestServiceOffline:
service_offline = BaseRequest().api_load(path_setting.OFFLINE_DATA)
ServiceOffline_case, ServiceOffline_data = get_ids(service_offline, "service_offline")
@pytest.mark.parametrize("params",ServiceOffline_data,ids=ServiceOffline_case)
def test_ServiceOffline_data(self,params):
r = web_request().service_offline(params['id'],params['csrfmiddlewaretoken'])
print("=======",r)
if r["error"] == 0:
assert r["error"] == params["assert"]
service_detail:
-
case: "编辑商品-进入商品详情页 "
assert: 0
service_register:
#我的商品菜单下有数据返回1
-
case: "发布(新增)商品-保存商品"
name: "激光溶脂瘦脸"
project_type: "[236]"
upgrade: "true"
short_description: "测试"
doctor_id: "wangyang"
start_time: "1624377600"
end_time: "1627660800"
photo_details: "<p>12</p>"
image_header: "https://heras.igengmei.com/service/2021/06/01/0b9b110e60"
video_token: "UPCOYIJkZOMcdd9FDzpBqYjzWUh55fBpVi3AhWpL:nBdvXYz_CR7wNcuroo3TLyvuQiY=:eyJzY29wZSI6InZpZGVvIiwiZGVhZGxpbmUiOjE2MjI1MTg2NTd9"
service_type: "0"
is_specialreview: "false"
reservation: "1"
have_extra_pay: "false"
is_draft: "0"
items: '[{"gengmei_price":100,"original_price":200,"is_online":true}]'
csrfmiddlewaretoken: "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
assert: 0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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