Commit 1a829189 authored by 林颖's avatar 林颖

Merge branch 'common_dev' into ly_dev

parents ea2dc125 26698d0f
......@@ -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")
......@@ -135,6 +135,12 @@ class live_request(BaseRequest):
def service_page_live_enter(self,service_id):
self.params["service_id"] = service_id
return self.api_send(self.data["service_page_live_enter"])
#观众分享直播
def share_click(self,stream_id,share_channel):
self.params["stream_id"] = stream_id
self.params["share_channle"] = share_channel
return self.api_send(self.data["share_click"])
if __name__ == '__main__':
# print(live_request().live_services("745", "4177", "0", "10"))
......@@ -149,3 +155,4 @@ if __name__ == '__main__':
print(live_request().delete_live_gift("739", "59127", "1", "4283", "7.45.0"))
# print(live_request().pop_gift("4271", "59124", "746.0"))
# print(live_request().get_gift( "59124", "746.0"))
print(live_request().share_click('4340','What'))
\ No newline at end of file
......@@ -173,3 +173,13 @@ service_page_live_enter:
service_id: ${service_id}
data: {}
json: {}
#观众点击直播内美购
share_click:
method: post
url: /api/janus/live/share_click
params: {}
data:
stream_id: ${stream_id}
share_channel: ${share_channel}
json: {}
\ No newline at end of file
......@@ -4,6 +4,8 @@ from in_common.base_request import BaseRequest
class janus_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.JANUS_CONFIG)
#捜索结果页-综合/百科tab
self.data = self.api_load(path_setting.CONTENTV7_CONFIG)
......@@ -25,6 +27,9 @@ class janus_request(BaseRequest):
#直播获取美颜
#self.data = self.api_load(path_setting.BEAUTY_CONFIG)
# #项目榜单主页
# self.data = self.api_load(path_setting.PROJECT_RANK_CONFIG)
......@@ -70,7 +75,7 @@ class janus_request(BaseRequest):
def mine_guess_you_like(self):
return self.api_send(self.data["mine_guess_you_like"])
#商祥页-详情/商祥页-本院推荐
#商祥页-详情
def product_detail(self, service_id, service_item_id, version):
self.params["service_id"] = service_id
self.params["service_item_id"] = service_item_id
......@@ -267,6 +272,27 @@ class janus_request(BaseRequest):
#
#项目榜单主页
def project_rank(self, id, version, current_city_id, device_id='8C3EB981-B22D-43E2-B208-34F6036505BB'):
self.params["id"] = id
self.params["version"] = version
self.params["current_city_id"] = current_city_id
return self.api_send(self.data["project_rank"])
#项目榜单-商品榜单排序
def commodity_rank(self, sort_type, commodity_rank_id, version, device_id='8C3EB981-B22D-43E2-B208-34F6036505BB'):
self.params["sort_type"] = sort_type
self.params["commodity_rank_id"] = commodity_rank_id
self.params["version"] = version
return self.api_send(self.data["commodity_rank"])
#首页-品类聚合页icon
def resource_bit(self, current_city_id, version, device_id='8C3EB981-B22D-43E2-B208-34F6036505BB'):
self.params["current_city_id"] = current_city_id
self.params["version"] = version
return self.api_send(self.data["resource_bit"])
if __name__ == '__main__':
......@@ -381,5 +407,9 @@ if __name__ == '__main__':
# #直播-主播修改美颜
# print("change meiyan")
# print(janus_request().beauty_post("739","true","0.60","0.40","0.70"))
#项目榜单主页
print(janus_request().project_rank("143", "748.0", "beijing"))
# 商祥页-推荐商品-新接口
print(janus_request().service_promotion_related_service_data('5828374', 1, 'beijing'))
#搜索结果页
content_v7:
method : get
url : /api/janus/search/v7/content
......@@ -13,6 +14,7 @@ content_v7:
data: {}
json: {}
#医院主页搜索
hospital_search:
method: get
url: /api/janus/search/hospital_search
......@@ -370,3 +372,36 @@ sales_lead_spu_by_diary:
data: {}
json: {}
isLogin: 0
#项目榜单主页
project_rank:
method: GET
url: /api/janus/product/mall/project_rank
params:
id: ${id}
version: ${version}
current_city_id: ${current_city_id}
data: {}
json: {}
#项目榜单-商品榜单排序
commodity_rank:
method: GET
url: /api/janus/product/mall/commodity_rank
params:
sort_type: ${sort_type}
commodity_rank_id: ${commodity_rank_id}
version: ${version}
data: {}
json: {}
#首页-品类聚合页icon
resource_bit:
method: GET
url: /api/janus/product/home_page/resource_bit
params:
current_city_id: ${current_city_id}
version: ${version}
data: {}
json: {}
import path_setting
from in_common.base_request import BaseRequest
class polymerization_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.POLYMERIZATION_REQUEST_CONFIG)
#品类聚合页-社区/视频列表
def polymerization_content(self, tabtype, category_polymer_id, page, tag_ids, operation_id, level, version, device_id='8C3EB981-B22D-43E2-B208-34F6036505BB'):
self.params["tabtype"] = tabtype
self.params["category_polymer_id"] = category_polymer_id
self.params["page"] = page
self.params["tag_ids"] = tag_ids
self.params["operation_id"] = operation_id
self.params["level"] = level
self.params["version"] = version
return self.api_send(self.data["polymerization_content"])
if __name__ == "__main__":
# 品类聚合页-社区/视频列表
print(polymerization_request().polymerization_content("choice", "39", "1", "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]", "85", "3", "7.48.0"))
#品类聚合页-社区/视频列表
polymerization_content:
method: GET
url: /api/polymerization/content
params:
tabtype: ${tabtype}
category_polymer_id: ${category_polymer_id}
page: ${page}
tag_ids: ${tag_ids}
operation_id : ${operation_id}
level: ${level}
version: ${version}
data: {}
json: {}
import path_setting
from in_common.base_request import BaseRequest
class rank_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.RANK_REQUEST_CONFIG)
#更美榜单-机构榜
def rank_hospital(self, city_id, version, device_id= '8C3EB981-B22D-43E2-B208-34F6036505BB'):
self.params["city_id"] = city_id
self.params["version"] = version
return self.api_send(self.data["rank_hospital"])
#更美榜单-医生榜
def rank_doctor(self, city_id, version):
self.params["city_id"] = city_id
self.params["version"] = version
return self.api_send(self.data["rank_doctor"])
if __name__ == '__main__':
print(rank_request().rank_hospital("beijing", "748.0"))
#更美榜单-机构榜
rank_hospital:
method: GET
url: /api/rank/hospital
params:
city_id: ${city_id}
version: ${version}
data: {}
json: {}
#更美榜单-医生榜
rank_doctor:
method: GET
url: /api/rank/doctor
params:
city_id: ${city_id}
version: ${version}
\ 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
......
......@@ -7,8 +7,16 @@ class web3_request(BaseRequest):
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"))
......@@ -6,3 +6,13 @@ conversation_robot_get_page:
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
......@@ -65,8 +65,56 @@ class achelous_request(BaseRequest):
self.params["unit"] = unit
return self.api_send(self.data["unit_update"])
#om后台-登录
def account_login(self,username,password):
self.params["username"] = username
self.params["password"] = password
return self.api_send(self.data["account_login"])
# 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', '', ''))
print(achelous_request().account_login('chenrenkai','123456'))
# 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())
......@@ -90,3 +90,68 @@ unit_update:
unit: ${unit}
json: {}
isLogin: 1
#om后台-登录
account_login:
method: post
url: /achelous/account/login
params: {}
data:
username: ${username}
password: ${password}
json: {}
#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
......@@ -9,6 +9,7 @@ LOGIN_FUNCTION_DATA = os.path.join(BASE_DIR, "backend_auto", "login_session_func
APYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "account_request.yaml")
LOGIN_VFC = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data", "login_vfc.yaml")
JANUS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
# 日记本总接口配置
DIARY_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "diary_request.yaml")
......@@ -299,6 +300,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")
......@@ -507,6 +518,7 @@ CONVERSATIONUSERID=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_dat
#医生后台-私信机器人
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")
#医生后台-服务资源
......@@ -636,6 +648,8 @@ CHECK_SPU_IDS = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_dat
ACHELOUS_REQUEST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_om_api", "achelous_request.yaml")
#直播-om后台-批量添加美购
BATCH_ADD_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_om_data/achelous_data", "batch_add_service.yaml")
#登录
ACCOUNT_DATA = os.path.join(BASE_DIR, "backend_auto/test_om_data/achelous_data", "account_login.yaml")
#次卡商详页
BEAUTY_CARD_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_detail.yaml")
......@@ -723,6 +737,9 @@ DELETEGIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_d
M_GET_CHANNEL_STATUS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
M_GET_CHANNEL_STATUS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "m_get_channel_status.yaml")
#观众分享直播
SHARE_CLICK = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "share_click.yaml")
#观众进入直播间
ENTER_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "live_request.yaml")
ENTER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "enter.yaml")
......@@ -816,6 +833,34 @@ FAVORS_ANASWERS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_da
ACCOUNT_HOMEPAGE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "account_request.yaml")
ACCOUNT_HOMEPAGE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data", "account_homepage.yaml")
#项目榜单主页
# PROJECT_RANK_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
PROJECT_RANK = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "project_rank.yaml")
#项目榜单-商品榜单排序
COMMODITY_RANK = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "commodity_rank.yaml")
#更美榜单
RANK_REQUEST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "rank_request.yaml")
#更美榜单-机构榜
RANK_HOSPITAL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/rank_data", "rank_hospital.yaml")
#更麽榜单-医生榜
RANK_DOCTOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/rank_data", "rank_doctor.yaml")
#首页-品类聚合页icon
RESOURCE_BIT = os.path.join(BASE_DIR,"backend_auto/test_backend_data/janus_data", "resource_bit.yaml")
#品类聚合页-社区/视频列表
POLYMERIZATION_REQUEST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "polymerization_request.yaml")
POLYMERIZATION_CONTENT = os.path.join(BASE_DIR,"backend_auto/test_backend_data/polymerization_data", "polymerization_content.yaml")
#获取验证码
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")
......
......@@ -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"]
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
class TestCommodityRank:
data = BaseRequest().api_load(path_setting.COMMODITY_RANK)
commodity_rank_case, commodity_rank_data = get_ids(data, "commodity_rank")
@pytest.mark.parametrize("param", commodity_rank_data, ids=commodity_rank_case)
def test_commodity_rank(self,param):
project_rank = janus_request().project_rank("143", "748.0", "beijing")
param["title"] = project_rank["data"]["project_detail"]["items"][0]["title"]
param["commodity_rank_id"] = project_rank["data"]["project_detail"]["items"][0]["exposure"]["card_id"]
r = janus_request().commodity_rank(param["sort_type"], param["commodity_rank_id"], param["version"])
if r["error"] == 0:
assert r["data"]["commodity_detail"]["title"] == param["title"]
print("项目榜单-商品榜单接口已通")
else:
assert r["error"] == param["assert_error"]
print("项目榜单-商品榜单接口出错了")
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
class TestProjectRank:
data = BaseRequest().api_load(path_setting.PROJECT_RANK)
project_rank_case, project_rank_data = get_ids(data, "project_rank")
@pytest.mark.parametrize("param", project_rank_data, ids=project_rank_case)
def test_project_rank(self, param):
r = janus_request().project_rank(param["id"], param["version"], param["current_city_id"])
if r["error"] == 0:
assert r["data"]["project_detail"]["title"] == param["assert"]
print("项目榜单主页接口已通")
else:
assert r["error"] == param["assert_error"]
print("接口出错了")
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
class TestResourceBit:
data = BaseRequest().api_load(path_setting.RESOURCE_BIT)
resource_bit_case, resource_bit_data = get_ids(data, "resource_bit")
@pytest.mark.parametrize("param", resource_bit_data, ids=resource_bit_case)
def test_resource_bit(self,param):
r = janus_request().resource_bit(param["current_city_id"], param["version"])
if r["error"] ==0:
assert r["data"]["pro_category"][0]["exposure"]["card_type"] == param["assert"]
print("首页-品类聚合页icon接口正常哦")
else:
assert r["error"] == 99
print("接口出错了")
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.janus_live_request import live_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestShareClick:
data = BaseRequest().api_load(path_setting.SHARE_CLICK)
share_click_case, share_click_data = get_ids(data, "share_click")
@pytest.mark.parametrize("param", share_click_data, ids=share_click_case)
def test_share_click(self, param):
r = live_request().share_click(param["stream_id"], param["share_channel"],)
if r["error"] == 0:
assert r["error"] == param["assert"]
else:
assert r["error"] == param["assert"]
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.polymerization_request import polymerization_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestPolymerizationContent:
data = BaseRequest().api_load(path_setting.POLYMERIZATION_CONTENT)
polymerizaiton_content_case, polymerizaiton_content_data = get_ids(data, "polymerization_content")
@pytest.mark.parametrize("param", polymerizaiton_content_data, ids=polymerizaiton_content_case)
def test_polymerization_content(self,param):
r = polymerization_request().polymerization_content(param["tabtype"], param["category_polymer_id"], param["page"], param["tag_ids"], param["operation_id"], param["level"], param["version"])
if r["error"] == 0:
assert len(r["data"]["features"]) != param["assert"]
# assert r["data"]["features"][0]["diary"]["tags"][0]["tag_id"] == param["operation_id"]
print("品类聚合页-社区/视频列表接口已通哦")
else:
assert r["error"] == 99
print("接口出错了")
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.rank_request import rank_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestRankDoctor:
data = BaseRequest().api_load(path_setting.RANK_DOCTOR)
rank_doctor_case, rank_doctor_data = get_ids(data, "rank_doctor")
@pytest.mark.parametrize("param", rank_doctor_data, ids=rank_doctor_case)
def test_rank_doctor(self, param):
r = rank_request().rank_doctor(param["city_id"], param["version"])
if r["error"] == 0:
assert r["data"]["data"][0]["hospital"].find(param['assert_city']) != param["assert"]
print("更美榜单-医生榜接口已通")
else:
assert r["data"]["data"][0]["hospital"].find(param["assert_city"]) == param["assert_error"]
print("更美榜单-医生榜,接口出错了")
import pytest
import path_setting
from all_backend_api.rank_request import rank_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestRankHospital:
data = BaseRequest().api_load(path_setting.RANK_HOSPITAL)
rank_hospital_case, rank_hospital_data = get_ids(data, "rank_hospital")
@pytest.mark.parametrize("param", rank_hospital_data, ids=rank_hospital_case)
def test_rank_hospital(self,param):
r = rank_request().rank_hospital(param["city_id"], param["version"])
if r["error"] == 0:
assert r["data"]["data"][0]["name"].find(param["assert_city"]) != param["assert"]
else:
assert r["data"]["data"][0]["name"].find(param["assert_city"]) == param["assert_error"]
......@@ -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('接口出错了')
......@@ -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
#城市筛选器
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
......
commodity_rank:
#项目榜单-商品榜单,按销量榜排序
-
case: "项目榜单-商品榜单,按照销量榜排序"
sort_type: 30
commodity_rank_id: #此字段取自项目榜单主页接口
version: 748.0
-
case: "项目榜单-商品榜单,按人气榜排序"
sort_type: 31
commodity_rank_id:
version: 748.0
-
case: "项目榜单-商品榜单,按口碑榜排序"
sort_type: 32
commodity_rank_id:
version: 748.0
project_rank:
#项目榜单主页
-
case: "项目榜单主页接口已通"
id: 143
version: 748
current_city_id: beijing
assert: 测试商品榜单
assert_error: 0
\ No newline at end of file
resource_bit:
#首页-品类聚合页icon接口正常哦
-
case: "首页-品类聚合页icon接口正常哦"
current_city_id: beijing
version: 748.0
assert: icon
\ No newline at end of file
share_click:
-
case: "观众分享直播-微信"
url: /api/janus/live/share_click
stream_id: "4340"
share_channel: "Wchat"
assert: 0
-
case: "观众分享直播-朋友圈"
url: /api/janus/live/share_click
stream_id: "4340"
share_channel: "WechatMoments"
assert: 0
-
case: "观众分享直播-qq"
url: /api/janus/live/share_click
stream_id: "4340"
share_channel: "QQ"
assert: 0
-
case: "观众分享直播-微博"
url: /api/janus/live/share_click
stream_id: "4340"
share_channel: "Weibo"
assert: 0
\ No newline at end of file
......@@ -2,6 +2,6 @@ finish:
#主播下播了,呜呜呜
-
case: "主播下播了,呜呜呜"
channel_id: "745"
channel_id: "739"
version: "7.45.0"
assert: 0
\ No newline at end of file
polymerization_content:
#品类聚合页-眼部整形-推荐-全部tab-社区列表
-
case: "品类聚合页-眼部整形-推荐-全部tab-社区列表"
tabtype: choice
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 12
level: 1
version: 748.0
assert: 0
#品类聚合页-眼部整形-推荐-全部tab-视频列表
-
case: "品类聚合页-眼部整形-推荐-全部tab-视频列表"
tabtype: home_video
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 12
level: 1
version: 748.0
assert: 0
#品类聚合页-眼部整形-推荐-切开双眼皮tab-社区列表
-
case: "品类聚合页-眼部整形-推荐-切开双眼皮tab-社区列表"
tabtype: choice
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 85
level: 3
version: 748.0
assert: 0
#品类聚合页-眼部整形-推荐-切开双眼皮tab-视频列表
-
case: "品类聚合页-眼部整形-推荐-切开双眼皮tab-视频列表"
tabtype: home_video
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 85
level: 3
version: 748.0
assert: 0
#品类聚合页-眼部整形-双眼皮-全部tab-社区列表
-
case: "品类聚合页-眼部整形-双眼皮-全部tab-社区列表"
tabtype: choice
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 13
level: 2
version: 748.0
assert: 0
#品类聚合页-眼部整形-双眼皮-全部tab-视频列表
-
case: "品类聚合页-眼部整形-双眼皮-全部tab-视频列表"
tabtype: home_video
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 13
level: 2
version: 748.0
assert: 0
#品类聚合页-眼部整形-双眼皮-埋线双眼皮tab-社区列表
-
case: "品类聚合页-眼部整形-双眼皮-埋线双眼皮tab-社区列表"
tabtype: choice
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 86
level: 3
version: 748.0
assert: 0
#品类聚合页-眼部整形-双眼皮-埋线双眼皮tab-视频列表
-
case: "品类聚合页-眼部整形-双眼皮-埋线双眼皮tab-视频列表"
tabtype: home_video
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 86
level: 3
version: 748.0
assert: 0
\ No newline at end of file
rank_doctor:
#更美榜单-医生榜(北京)
-
case: "更美榜单-医生榜(北京)"
city_id: beijing
version: 748.0
assert_city: 北京
assert: -1
assert_error: 99
#更美榜单-医生榜(上海)
-
case: "更美榜单-医生榜(上海)"
city_id: shanghai
version: 748.0
assert_city: 上海
assert: -1
assert_error: 99
\ No newline at end of file
rank_hospital:
#更美榜单-机构榜(北京)
-
case: "更美榜单-机构榜(北京)"
city_id: beijing
version: 748.0
assert_city: 北京
assert: -1
assert_error: 99
#更美榜单-机构榜(上海)
-
case: "更美榜单-机构榜(上海)"
city_id: shanghai
version: 748.0
assert_city: 上海
assert: -1
assert_error: 99
\ No newline at end of file
recommend_service:
-
case: "测肤底部feed流"
current_city_id: "beijing"
current_city_id: "worldwide"
offset: 0
size: 10
appeal_tag_ids: '[2306,2303,2551,2355,2322,2337]'
......
......@@ -3,7 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-08-16 17:42:16
content: ces测试+2021-08-20 18:22:51
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......
......@@ -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
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"]
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: "配置成功"
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 TestAccountLogin:
data = BaseRequest().api_load(path_setting.ACCOUNT_DATA)
account_login_case, account_login_data = get_ids(data, "account_login")
@pytest.mark.parametrize("param",account_login_data,ids=account_login_case)
def test_batch_add_service(self,param):
r = achelous_request().account_login(param['username'],param['password'])
if r["code"] == 0:
assert r['msg'] == param["assert"]
elif r["code"] == 20001:
assert r['msg'] == param["assert"]
elif r["code"] == 20005:
assert r['msg'] == param["assert"]
else:
assert r['error'] == param["assert"]
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
account_login:
-
case: "om后台登录"
username: "chenrenkai"
password: "123456"
assert: "success!"
-
case: "登录失败-账号密码错误"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第二次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第三次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第四次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第五次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第六次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第七次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第八次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第九次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第十次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第十一次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第12次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第13次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第14次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第15次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第16次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第17次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第18次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第19次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "第20次登录失败"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "账号或密码输入错误,请核对后重新输入!"
-
case: "登录超限账号锁定"
username: "chenrenkaizidonghua"
password: "dng6Rq1"
assert: "尝试次数超过20次,您的帐号被锁定1小时,请1小时后重新登录"
#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