Commit ad848407 authored by 张淑琴's avatar 张淑琴

Merge branch 'common_dev' into zzsq_dev

parents ccedf9de 3322c036
......@@ -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
......@@ -25,11 +25,49 @@ class web_request(BaseRequest):
self.params["phone"] = phone
return self.api_send(self.ACCOUNT_URL["doctor_verificationcode"])
# 医生后台-商户管理-医生管理列表--创建医生上传头像图片
# 医生后台-商户管理-医生管理列表--创建医生上传头像图片--暂时还没写case待定
def file_upload(self,phone):
self.params["phone"] = phone
return self.api_send(self.ACCOUNT_URL["file_upload"])
# 医生后台-商户管理-医生管理列表--创建医生--提交创建单
def doctor_register_post(self,profession_licences,b_licences,p_licences,personal_pictures,register_phone,verification_code):
self.params["profession_licences"] = profession_licences
self.params["b_licences"] = b_licences
self.params["p_licences"] = p_licences
self.params["personal_pictures"] = personal_pictures
self.params["register_phone"] = register_phone
self.params["verification_code"] = verification_code
return self.api_send(self.ACCOUNT_URL["doctor_register_post"])
# 医生后台-商户管理-医生管理列表--查看审核中的医生
def doctor_register(self,doctorregister_id):
self.params["doctorregister_id"] = doctorregister_id
return self.api_send(self.ACCOUNT_URL["doctor_register"])
# 医生后台-密码登录
def account_login(self,name, password, method='password' ):
self.params["name"] = name
self.params["password"] = password
self.params["method"] = method
return self.api_send(self.ACCOUNT_URL["account_login"])
# 医生后台-修改密码发送验证码
def account_code_online(self,csrfmiddlewaretoken ):
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
return self.api_send(self.ACCOUNT_URL["account_code_online"])
# 医生后台-修改密码
def account_password(self,new_password, code='' ):
self.params["new_password"] = new_password
# code = self.xxx() # 待会补上方法
self.params["code"] = code
return self.api_send(self.ACCOUNT_URL["account_password"])
def service_offline(self,id,csrfmiddlewaretoken):
......
......@@ -248,3 +248,67 @@ file_upload:
data: {}
json: {}
isLogin: 1 #需要登录
#医生后台-商户管理-医生管理列表--查看审核中的医生
doctor_register:
method: get
url: /api/web/doctor/register
params:
doctorregister_id: ${doctorregister_id}
data: {}
json: {}
isLogin: 1 #需要登录
#医生后台-商户管理-医生管理列表--创建医生--提交创建单
doctor_register_post:
method: post
url: /api/web/doctor/register
params: {}
data:
profession_licences: ${profession_licences}
b_licences: ${b_licences}
p_licences: ${p_licences}
personal_pictures: ${personal_pictures}
register_phone: ${register_phone}
verification_code: ${verification_code}
json: {}
isLogin: 1 #需要登录
#医生后台-账号密码登录
account_login:
method: post
url: /api/web/account/login
params: {}
data:
name: ${name}
password: ${password}
method: ${method}
json: {}
#医生后台-修改密码发送验证码
account_code_online:
method: post
url: /api/web/account/code/online
params: {}
data:
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
json: {}
isLogin: 1
#医生后台-修改密码
account_password:
method: post
url: /api/web/account/password
params: {}
data:
new_password: ${new_password}
code: ${code}
json: {}
isLogin: 1
......@@ -65,11 +65,16 @@ 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_name, is_online, is_display, is_move, page, size):
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
......@@ -96,13 +101,20 @@ class achelous_request(BaseRequest):
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"))
\ No newline at end of file
# print(achelous_request().catalog_add(1, "自动化接口测试添加2", 15510, [], "false", "false", "false"))
print(achelous_request().category_export_catalog_datas())
......@@ -91,6 +91,15 @@ unit_update:
json: {}
isLogin: 1
#om后台-登录
account_login:
method: post
url: /achelous/account/login
params: {}
data:
username: ${username}
password: ${password}
json: {}
#OM后台-商业分类管理,后台分类(工业)
industry_search:
......@@ -99,6 +108,7 @@ 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}
......@@ -136,3 +146,12 @@ catalog_add:
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")
......@@ -170,6 +171,19 @@ KEYWORDS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/search_data",
DOCTORLIST = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "doctor_doctorlist.yaml")
# 医生后台-商户管理-医生管理列表--创建医生发送验证码
DOCTOR_VERIIFICATIONCODE = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "doctor_verificationcode.yaml")
# 医生后台-商户管理-医生管理列表--审核中的医生查看
DOCTOR_REGISTER = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "doctor_register.yaml")
# 医生后台-商户管理-医生管理列表--创建医生--提交创建单
DOCTOR_REGISTER_POST = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "doctor_register_post.yaml")
# 医生后台-账号密码登录
DOCTOR_LOGIN = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "account_login.yaml")
# 医生后台-修改密码--发送验证码
DOCTOR_CODE_ONLINE = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "account_code_online.yaml")
# 医生后台-修改密码
DOCTOR_PASSWORD = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "account_password.yaml")
#医生后台-我的商品
SERVICE_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "service_list.yaml")
......@@ -643,6 +657,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_DATAA = 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")
......@@ -730,6 +746,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")
......@@ -823,6 +842,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")
......
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"]
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: 你的回复有点频繁,稍后再来
......
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 TestAccountCodeOnline:
data = BaseRequest().api_load(path_setting.DOCTOR_CODE_ONLINE)
account_code_online_case, account_code_online_data = get_ids(data, "account_code_online")
@pytest.mark.parametrize("param",account_code_online_data,ids=account_code_online_case)
def test_account_code_online(self,param):
r = web_request().account_code_online(param["csrfmiddlewaretoken"])
assert r["error"] == param["error"]
assert r["message"] == param["message"]
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 TestAccountLogin:
data = BaseRequest().api_load(path_setting.DOCTOR_LOGIN)
account_login_case, account_login_data = get_ids(data, "account_login")
@pytest.mark.parametrize("param",account_login_data,ids=account_login_case)
def test_account_login(self,param):
r = web_request().account_login(param["name"],param["password"])
assert r["error"] == param["error"]
assert r["message"] == param["message"]
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 TestAccountPassword:
data = BaseRequest().api_load(path_setting.DOCTOR_PASSWORD)
account_password_case, account_password_data = get_ids(data, "account_password")
@pytest.mark.parametrize("param",account_password_data,ids=account_password_case)
def test_account_password(self,param):
r = web_request().account_password(param["new_password"], param["code"])
assert r["error"] == param["error"]
assert r["message"] == param["message"]
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 TestDoctorRegister:
data = BaseRequest().api_load(path_setting.DOCTOR_REGISTER)
doctor_register_case, doctor_register_data = get_ids(data, "doctor_register")
@pytest.mark.parametrize("param",doctor_register_data,ids=doctor_register_case)
def test_doctor_register(self,param):
r = web_request().doctor_register(param["doctorregister_id"])
if r["error"] == 0:
assert r["error"] == param["assert"]
assert r["data"]['register_phone'] is not None and r["data"]['register_phone'] is not "" # 校验注册手机号不为空
assert r["data"]['department'] is not None and r["data"]['department'] is not "" # 校验所在科室不为空
assert r["data"]['good_at'] is not None and r["data"]['good_at'] is not "" # 校验项目不为空
assert r["data"]['name'] is not None and r["data"]['name'] is not "" # 校验名字不为空
assert r["data"]['professional_certificate_num'] is not None and r["data"]['professional_certificate_num'] is not "" # 校验证书不为空
# elif r["error"] == 1:
# assert r["message"] == params["assert"]
\ No newline at end of file
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 TestDoctorRegisterPost:
data = BaseRequest().api_load(path_setting.DOCTOR_REGISTER_POST)
doctor_register_post_case, doctor_register_post_data = get_ids(data, "doctor_register_post")
@pytest.mark.parametrize("param",doctor_register_post_data,ids=doctor_register_post_case)
def test_doctor_register(self,param):
r = web_request().doctor_register_post(param["profession_licences"],
param["b_licences"],
param["p_licences"],
param["personal_pictures"],
param["register_phone"],
param["verification_code"])
# if r["error"] == 0:
assert r["data"]['code'] == param["code"]
assert r["data"]['message'] == param["message"]
account_code_online:
-
case: "医生后台-修改密码发送验证码 "
error: 0
csrfmiddlewaretoken: 'ICODxWkFPFGlGAX7cwzeXeszBnHzADuK'
message: '验证码已发送至您的手机'
#13221031104
account_login:
-
case: "医生后台-账号密码登录--密码错误导致的登录失败 "
error: 70002
name: 12345654321
password: 123451
message: '登陆失败'
-
case: "医生后台-账号密码登录--账号不存在导致的登录失败 "
error: 30003
name: 123456543211
password: 123451
message: '医生未申请审核加入'
-
case: "医生后台-账号密码登录--登录成功 "
error: 0
name: 12345678912
password: 123456
message: ""
account_password:
# 判断条件是先看密码在看验证码,所以先判断密码,验证码能判断不符合的
-
case: "医生后台-修改密码--密码格式不符合--全数字 "
error: 22007
new_password: 123456
code: 123451
message: '新密码不符合要求,请重新输入'
-
case: "医生后台-修改密码--密码格式不符合--全字母 "
error: 22007
new_password: aaaaaaaa
code: 123451
message: '新密码不符合要求,请重新输入'
-
case: "医生后台-修改密码--密码格式不符合--混合但少于6位 "
error: 22007
new_password: 1234w
code: 123451
message: '新密码不符合要求,请重新输入'
-
case: "医生后台-修改密码--密码格式不符合--混合但是多于16位 "
error: 22007
new_password: 1234567890123456a
code: 123451
message: '新密码不符合要求,请重新输入'
-
case: "医生后台-修改密码--密码格式不符合--验证码不符合 "
error: 22001
new_password: '12345a'
code: 123451
message: '错误的验证码'
doctor_register:
-
case: "医生后台-商户管理-医生管理列表--查看审核中的医生 "
assert: 0
doctorregister_id: 24086
\ No newline at end of file
doctor_register_post:
-
case: "医生后台-商户管理-医生管理列表--创建医生--提交创建单 "
assert: 0
profession_licences: '[]'
b_licences: '["https://heras.igengmei.com/doctor/2021/08/23/9ea8142bf3","https://heras.igengmei.com/doctor/2021/08/23/63aebceaab"]'
p_licences: '["https://heras.igengmei.com/doctor/2021/08/23/d08135f514","https://heras.igengmei.com/doctor/2021/08/23/c1da681094"]'
personal_pictures: '["https://heras.igengmei.com/service/2021/08/23/ba69400864"]'
register_phone: 13984574071
verification_code: 133131
code: 1
message: '验证码错误!'
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_DATAA)
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 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
......@@ -12,8 +12,8 @@ class TestIndustrySearch:
@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_name"],param["is_online"], param["is_display"], param["is_move"], param["page"], param["size"])
# print(r)
if r["code"] == 0 and r["msg"] == "success":
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后台-商业分类管理,后台分类(工业)
industry_search:
-
case: '搜索口腔标签'
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"
......
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