Commit 312a0424 authored by 张慧's avatar 张慧

解决冲突

parents 62eb92f7 9695a899
......@@ -10,10 +10,11 @@ class feed_request(BaseRequest):
self.data = self.api_load(path_setting.FREE_RECRUIT_BANNER_CONFIG)
def index_v9(self,tabtype,version,current_city_id):
def index_v9(self,tabtype,version,current_city_id,tab_id='0'):
self.params["tabtype"] = tabtype
self.params["version"] = version
self.params["current_city_id"] = current_city_id
self.params["tab_id"] = tab_id
return self.api_send(self.data["index_v9"])
......
......@@ -5,6 +5,7 @@ index_v9:
tabtype: ${tabtype}
version: ${version}
current_city_id: ${current_city_id}
tab_id: ${tab_id}
data:
json: {}
isLogin: 1
......
......@@ -7,12 +7,14 @@ class im_request(BaseRequest):
self.data = self.api_load(path_setting.CONVERSATION_DETAIL_CONFIG)
def conversation_detail(self, current_city_id, begin_msg_id, conversation_type, end_msg_id,referrer):
#咨询师聊天详情页
self.params["current_city_id"] = current_city_id
self.params["begin_msg_id"] = begin_msg_id
self.params["conversation_type"] = conversation_type
self.params["end_msg_id"] = end_msg_id
self.params["referrer"] = referrer
return self.api_send(self.data["conversation_detail"])
#该接口已下线
def auto_msg(self, trace_id, conversation_id):
self.params["trace_id"] = trace_id
......@@ -20,6 +22,7 @@ class im_request(BaseRequest):
return self.api_send(self.data["auto_msg"])
def send_msg(self, conversation_id, is_system, referrer, referrer_id, msg_type, content, extra):
#给咨询师发送消息
self.params["conversation_id"] = conversation_id
self.params["is_system"] = is_system
self.params["referrer"] = referrer
......@@ -28,6 +31,7 @@ class im_request(BaseRequest):
self.params["content"] = content
self.params["extra"] = extra
return self.api_send(self.data["send_msg"])
# 该接口已下线
def robot_get_second(self, page_type):
" 获取页面触发私信时间 "
......@@ -46,11 +50,10 @@ class im_request(BaseRequest):
if __name__ == '__main__':
print(im_request().conversation_detail("beijing", 0, 4, 0, "message_home"))
print("第二个接口")
#print(im_request().conversation_detail("beijing", 0, 4, 0, "message_home"))
print(im_request().auto_msg("2021/04/22/1722/70a1791606d5",368))
print("send_msg")
print(im_request().send_msg("368", 0, "message_home", "", 0, "您好,我想咨询一下", {}))
#print("send_msg")
#print(im_request().send_msg("368", 0, "message_home", "", 0, "您好,我想咨询一下", {}))
print(im_request().robot_get_second("3"))
print(im_request().robot_send_msg("715368769fea4a1ba0c85979112ed154", 1, "3", "gengmei", 33909952, "7.46.0"))
......
......@@ -71,7 +71,7 @@ if __name__ == '__main__':
# (living_request().danmu_v2("739", "1"))
# (living_request().pushlive_info("小冤家", "2021/04/22/1003/cef471cff5e6", "", "1", "1", "1"))
# print (living_request().sendmsg("739","你好"))
# print(living_request().finish("745", "746.0"))
print(living_request().finish("739", "747.0"))
# print(living_request().get_live_info_audience("745", "7.46.0"))
# print(living_request().replay_info("123456978", "746.0"))
print(living_request().replay_msg("123456978", "746.0"))
\ No newline at end of file
# print(living_request().replay_msg("123456978", "746.0")
\ No newline at end of file
......@@ -148,9 +148,27 @@ class user_request(BaseRequest):
return self.api_send(self.data["favors_answers"])
#忘记密码-设置密码
def change_pwd(self,version, change_type,new_password, repeat_password):
self.params["version"] = version
self.params["change_type"] = change_type
self.params["new_password"] = new_password
self.params["repeat_password"] = repeat_password
return self.api_send(self.data["change_pwd"])
# 修改密码
def change_pwdd(self, version, change_type, password, new_password, repeat_password):
self.params["version"] = version
self.params["change_type"] = change_type
self.params["password"] = password
self.params["new_password"] = new_password
self.params["repeat_password"] = repeat_password
return self.api_send(self.data["change_pwdd"])
#点击修改密码时获取用户信息
def check_pwd(self):
return self.api_send(self.data["check_pwd"])
if __name__ == '__main__':
#个人中心
......@@ -188,6 +206,15 @@ if __name__ == '__main__':
# 我的-收藏-日记贴
print(user_request().favors_topics(0, 10))
#忘记密码-修改密码
print(user_request().change_pwd('7.48.0',1,123456,123456))
#修改密码
print(user_request().change_pwdd('7.48.0',123456,1,123456,123456))
#修改密码时获取账号信息
print(user_request().check_pwd())
......@@ -210,3 +210,39 @@ favors_answers:
data: {}
json: {}
isLogin: 1
#忘记密码-设置密码
change_pwd:
method: post
url: /api/user/change_pwd
params:
version: ${version}
data:
change_type: ${change_type}
new_password: ${new_password}
repeat_password: ${repeat_password}
json: {}
isLogin: 1
#修改密码
change_pwdd:
method: post
url: /api/user/change_pwd
params:
version: ${version}
data:
password: ${password}
change_type: ${change_type}
new_password: ${new_password}
repeat_password: ${repeat_password}
json: {}
isLogin: 1
#修改密码时获取用户信息
check_pwd:
method: get
url: /api/user/check_pwd
params:
data:
json: {}
isLogin: 1
\ No newline at end of file
import path_setting
from in_common.base_request import BaseRequest
#获取验证码
class verification_code_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.VERIFICATION_CODE_REQUEST_CONFIG)
#获取验证码
def verification_code(self, phone,type,verifier):
self.params["phone"] = phone
self.params["type"] = type
self.params["verifier"] = verifier
return self.api_send(self.data["verification_code"])
if __name__ == '__main__':
print(verification_code_request().verification_code(12345678999,2, 'fd94aa08c242a00496aba1e5b556c436'))
\ No newline at end of file
verification_code:
method: post
url: /api/verification_code
params: {}
data:
phone: ${phone}
type: ${type}
verifier: ${verifier}
json: {}
\ No newline at end of file
......@@ -28,12 +28,13 @@ 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):
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
self.params["sort_type"] = sort_type
self.params["page"] = page
self.params["page_size"] = page_size
self.params["version"] = version
return self.api_send(self.data['beautycard_skus'])
......@@ -42,6 +42,8 @@ beautycard_skus:
page : ${page}
#分页大小
page_size : ${page_size}
#版本!!!
version : ${version}
data: {}
json: {}
import path_setting
from in_common.base_request import BaseRequest
class visual_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.VISUAL_CONFIG)
# 签到--其他tab 美购feed
def service_list(self, unit_id, current_city_id='beijing'):
self.params["unit_id"] = unit_id
self.params["current_city_id"] = current_city_id
return self.api_send(self.data['service_list'])
\ No newline at end of file
#签到--其他tab 美购feed
service_list:
method: GET
url: /api/visual/service_list
params:
#组件id
unit_id : ${unit_id}
current_city_id : ${current_city_id}
data: {}
json: {}
is_Login: 1
import path_setting
from in_common.base_request import BaseRequest
class web3_request(BaseRequest):
def __init__(self):
self.CONVERSATION_ROBOT = self.api_load(path_setting.CONVERSATION_ROBOT)
def conversation_robot_get_page(self):
return self.api_send(self.CONVERSATION_ROBOT["conversation_robot_get_page"])
if __name__ == '__main__':
print(web3_request().conversation_robot_get_page())
conversation_robot_get_page:
method: get
url: /api/web3/conversation/robot/get_page
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -15,6 +15,23 @@ class web_request(BaseRequest):
def doctor_submechanisms(self) :
return self.api_send(self.ACCOUNT_URL["doctor_submechanisms"])
# 医生后台-商户管理-医生管理列表
def doctor_doctorlist(self,doctor_type):
self.params["doctor_type"] = doctor_type
return self.api_send(self.ACCOUNT_URL["doctor_doctorlist"])
# 医生后台-商户管理-医生管理列表--创建医生发送验证码
def doctor_verificationcode(self,phone):
self.params["phone"] = phone
return self.api_send(self.ACCOUNT_URL["doctor_verificationcode"])
# 医生后台-商户管理-医生管理列表--创建医生上传头像图片
def file_upload(self,phone):
self.params["phone"] = phone
return self.api_send(self.ACCOUNT_URL["file_upload"])
def service_offline(self,id,csrfmiddlewaretoken):
self.params["id"] = id
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
......
......@@ -217,3 +217,34 @@ cpc_community_promote_flows:
data: {}
json: {}
isLogin: 1 #需要登录
#医生后台-商户管理-医生管理列表
doctor_doctorlist:
method: get
url: /api/web/doctor/doctorlist
params:
doctor_type: ${doctor_type}
data: { }
json: { }
isLogin: 1 #需要登录
#医生后台-商户管理-医生管理列表--创建医生发送验证码
doctor_verificationcode:
method: post
url: /api/web/doctor/verificationcode
params: {}
data:
phone: ${phone}
json: {}
isLogin: 1 #需要登录
#医生后台-商户管理-医生管理列表--创建医生上传头像图片
file_upload:
method: post
url: /api/web/file/upload
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -65,8 +65,44 @@ class achelous_request(BaseRequest):
self.params["unit"] = unit
return self.api_send(self.data["unit_update"])
# OM后台-商业分类管理,后台分类(工业)
def industry_search(self, tag_system_type, tag_name, is_online, is_display, is_move, page, size):
self.params["tag_system_type"] = tag_system_type
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"])
if __name__ == "__main__":
# print(achelous_request().batch_add_service("4176", "73809,23508,33823"))
# print(achelous_request().batch_del_service("4176","7312,7311"))
# print(achelous_request().special_edit("32244157","自定义专题创建1","0","2021-08-01 00:00:00","2021-09-30 00:00:00","1","自定义专题创建1","自定义专题创建1","https://heras.igengmei.com/4d5eef0a-78dd-43b3-98b7-137d2341f106-1628565831259"))
print(achelous_request().special_list('1', '10', '', '', '', '', '', '1', '0', '', ''))
\ No newline at end of file
# print(achelous_request().special_list('1', '10', '', '', '', '', '', '1', '0', '', ''))
# print(achelous_request().industry_search(1,"口腔","all","all","all",1,10))
# print(achelous_request().category_ordering(1002463,1,1,2))
print(achelous_request().catalog_add(1, "自动化接口测试添加2", 15510, [], "false", "false", "false"))
\ No newline at end of file
......@@ -89,4 +89,50 @@ unit_update:
order: ${order}
unit: ${unit}
json: {}
isLogin: 1
#OM后台-商业分类管理,后台分类(工业)
industry_search:
method: GET
url: /achelous/api/industry/search
params:
tag_system_type: ${tag_system_type}
tag_name: ${tag_name}
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
\ No newline at end of file
......@@ -156,10 +156,21 @@ SIGN_EXCHANGED = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_dat
SIGN_CALENDAR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "sign_calendar.yaml")
# 签到--其他 tab feed --也是总的 visual 配置项
VISUAL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "visual_request.yaml")
VISUAL_SERVICE_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/visual_data", "service_list.yaml")
#搜索首页-热门搜索
KEYWORDS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "search_request.yaml")
KEYWORDS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/search_data", "keywords.yaml")
# 医生后台--医生后台-商户管理-医生管理列表
DOCTORLIST = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "doctor_doctorlist.yaml")
# 医生后台-商户管理-医生管理列表--创建医生发送验证码
DOCTOR_VERIIFICATIONCODE = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "doctor_verificationcode.yaml")
#医生后台-我的商品
SERVICE_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "service_list.yaml")
......@@ -275,6 +286,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")
......@@ -480,6 +501,11 @@ CONVERSATIONCOUPON=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_dat
#医生后台-发送私信
CONVERSATIONUSERID=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "conversation_user_id.yaml")
#医生后台-私信机器人
CONVERSATION_ROBOT = os.path.join(BASE_DIR, "backend_auto/all_doctor_api", "web3_request.yaml")
ROBOTGETPAGE= os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web3_data", "conversation_robot_get_page.yaml")
#医生后台-服务资源
ADTYPELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "artemis_ad_type_list.yaml")
#医生后台-我的购物车
......@@ -639,7 +665,12 @@ BEAUTY_POST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data"
#直播关注/取关主播
FOLLOW_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "follow_add.yaml")
FOLLOW_DEL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "follow_del.yaml")
#忘记密码-设置密码
CHANGE_PWD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "change_pwd.yaml")
#修改密码
CHANGE_PWDD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "change_pwdd.yaml")
#设置密码时获取用户信息
CHECK_PWD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "check_pwd.yaml")
#主播-推荐袋美购列表展示
LIVESERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
......@@ -782,5 +813,9 @@ 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")
#获取验证码
VERIFICATION_CODE_REQUEST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "verification_code_request.yaml")
VERIFICATION_CODE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/verification_code_data", "verification_code.yaml")
if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG)
\ No newline at end of file
......@@ -12,9 +12,18 @@ class TestIndexV9:
@pytest.mark.parametrize("param",indexv9_data,ids=indexv9_case)
def test_index_v9(self,param):
r = feed_request().index_v9(param["tabtype"], param["version"], param["current_city_id"])
if r["error"] == 0:
if param['tabtype'] == "customize_commodity" :
r = feed_request().index_v9(param["tabtype"],param["version"],param["current_city_id"],param['tab_id'])
assert r["error"] == 0
features = r.get("data").get("features",[])
assert len(features) > param["assert"]
else:
r = feed_request().index_v9(param["tabtype"],param["version"], param["current_city_id"])
if r["error"] == 0:
features = r.get("data").get("features",[])
assert len(features) > param["assert"]
......@@ -6,7 +6,7 @@ from in_common.base_request import BaseRequest
from all_backend_api.im_request import im_request
class TestConversationDetail:
'''class TestConversationDetail:
data = BaseRequest().api_load(path_setting.CONVERSATION_DETAIL)
conversationdetail_case, conversationdetail_data = get_ids(data, "conversation_detail")
......@@ -15,5 +15,5 @@ class TestConversationDetail:
r = im_request().conversation_detail(param["current_city_id"], param["begin_msg_id"], param["conversation_type"], param["end_msg_id"], param["referrer"])
if r["error"] == 0:
msg_list = r.get("data").get("msg_list",[])
assert len(msg_list) > param["assert"]
assert len(msg_list) > param["assert"]'''
......@@ -6,7 +6,7 @@ from in_common.base_request import BaseRequest
from all_backend_api.im_request import im_request
class TestSendMsg:
'''class TestSendMsg:
data = BaseRequest().api_load(path_setting.SEND_MSG)
sendmsg_case, sendmsg_data = get_ids(data, "send_msg")
......@@ -18,5 +18,5 @@ class TestSendMsg:
assert r["data"]["conversation_type"] == param["assert_conversation_type"]
assert r["data"]["message_type"] == param["assert_message_type"]
if r["error"] == 1:
assert r["message"] == param["assert_message"]
assert r["message"] == param["assert_message"]'''
......@@ -2,6 +2,7 @@ import pytest
import path_setting
from all_backend_api.janus_live_request import live_request
from all_backend_api.live_request import living_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
......@@ -13,6 +14,14 @@ class TestAddLiveService:
@pytest.mark.parametrize("param", addliveservice_data, ids=addliveservice_case)
def test_add_live_service(self, param):
print(111111111111111111111)
pushlive = living_request().pushlive_info("啊哈", "2021/08/14/1003/cef471cff5e6", "啊哈-公告", "1", "2", "1")
param["channel_id"] = pushlive["data"]["channel"]
r = live_request().add_live_service(param["channel_id"], param["service_item_ids"], param["version"])
if r["error"] == 0:
assert r["data"]["toast"] == param["assert"]
\ No newline at end of file
assert r["data"]["toast"] == param["assert"]
else:
assert r["message"] == param["assert_message"]
print("接口出错了")
living_request().finish(param["channel_id"], "747.0")
living_request().finish(param["channel_id"], "747.0")
living_request().finish(param["channel_id"], "747.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_backend_api.user_request import user_request
class TestChangePwd:
data = BaseRequest().api_load(path_setting.CHANGE_PWD)
change_pwd_case, change_pwd_data = get_ids(data, "change_pwd")
@pytest.mark.parametrize("param",change_pwd_data, ids=change_pwd_case)
def test_change_pwd(self, param):
r = user_request().change_pwd(param["version"], param["change_type"],param["new_password"],param["repeat_password"])
if r.get("error_code") == 22006:
assert r["message"] == param["assert"]
elif r.get("error_code") == -1:
assert r["message"] == param["assert"]
elif r.get("error") == 0:
assert r["error"] == param["assert1"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.user_request import user_request
class TestChangePwdd:
data = BaseRequest().api_load(path_setting.CHANGE_PWDD)
change_pwdd_case, change_pwdd_data = get_ids(data, "change_pwdd")
@pytest.mark.parametrize("param",change_pwdd_data, ids=change_pwdd_case)
def test_change_pwdd(self, param):
r = user_request().change_pwdd(param["version"],param["password"] ,param["change_type"],param["new_password"],param["repeat_password"])
if r.get("error_code") == 22006:
assert r["message"] == param["assert"]
elif r.get("error_code") == -1:
assert r["message"] == param["assert"]
elif r.get("error") == 0:
assert r["error"] == param["assert"]
# else:
# assert r["message"] == param["assert2"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.user_request import user_request
class TestCheckPwd:
data = BaseRequest().api_load(path_setting.CHECK_PWD)
check_pwd_case, check_pwd_data = get_ids(data, "check_pwd")
@pytest.mark.parametrize("param",check_pwd_data, ids=check_pwd_case)
def test_check_pwd(self, param):
r = user_request().check_pwd()
if r["error"] == 0:
assert r["error"] == param["assert"]
\ No newline at end of file
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.verification_code_request import verification_code_request
class TestVerificationCode:
data = BaseRequest().api_load(path_setting.VERIFICATION_CODE)
verification_code_case, verification_code_data = get_ids(data, "verification_code")
@pytest.mark.parametrize("param",verification_code_data, ids=verification_code_case)
def test_verification_code(self, param):
r = verification_code_request().verification_code(param["phone"], param["type"], param["verifier"])
if r["error"] == 0:
assert r["error"] == param["assert"]
......@@ -12,12 +12,12 @@ 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["sort_type"], param["page"], param["page_size"],
param["version"])
if r["error"] == 0:
assert len(r["data"]["beautycards"]) > param["assert"]
assert len(r["data"]["beautycards"]) > param["assert_spu"]
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
......@@ -30,3 +30,6 @@ class TestBeautyCardSkus:
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('接口出错了')
import pytest
import path_setting
from all_backend_api.visual_request import visual_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestServiceList:
data = BaseRequest().api_load(path_setting.VISUAL_SERVICE_LIST)
service_list_case, service_list_data = get_ids(data, "service_list")
#
@pytest.mark.parametrize("param", service_list_data, ids=service_list_case)
def test_service_list(self, param):
r = visual_request().service_list(param["unit_id"])
assert r["error"] == 0
list = r.get("data").get("services",[])
assert len(list) == param["len"]
......@@ -7,14 +7,15 @@ index_v9:
version: "7.42.2"
assert: 0
- case: "推荐内容/接口请求成功,有数据返回"
- case: "直播tab请求成功,有数据返回"
current_city_id: "beijing"
tabtype: "home_video"
version: "7.42.2"
assert: 0
- case: "直播tab接口请求成功,有数据返回"
- case: "推荐内容/接口接口请求成功,有数据返回 "
current_city_id: "beijing"
tabtype: "customize_commodity"
version: "7.42.2"
assert: 0
\ No newline at end of file
version: 7.47.1
assert: 0
tab_id: 96
......@@ -2,15 +2,17 @@ add_live_service:
#主播-推荐袋添加商品-添加一个商品
-
case: "主播-推荐袋添加商品-添加一个商品"
channel_id: "747"
service_item_ids: "560641"
channel_id: ""#此字段取值直播开播接口的返参channel
service_item_ids: "380519"
version: "7.45.0"
assert : 成功添加1件商品
assert_message: ""
#主播-推荐袋添加商品-添加多个商品
-
case: "主播-推荐袋添加商品-添加多个商品"
channel_id: "747"
channel_id: ""#此字段取值直播开播接口的返参channel
service_item_ids: "108278,578088,585823"
version: "7.45.0"
assert : 成功添加3件商品
\ No newline at end of file
assert : 成功添加3件商品
assert_message: ""
\ No newline at end of file
......@@ -39,7 +39,7 @@ push_live_info:
cover_url: "2021/04/22/1003/cef471cff5e6"
notice: "公告"
tag_id: "1"
clarity: "2"
clarity: "3"
device_type: "1"
assert: 0
# assert_message1 : "请登录后再试"
......
......@@ -3,7 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-08-13 16:49:17
content: ces测试+2021-08-16 17:42:16
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......
change_pwd:
#忘记密码-设置密码
-
case: "新密码不可与旧密码相同"
version: 7.47.0
change_type: 1
new_password: 123456
repeat_password: 123456
assert: "新密码不可与旧密码相同"
#error_code: 22006
-
case: "密码不符合要求"
version: 7.48.0
change_type: 1
new_password: 123456
repeat_password: 123456
assert: "密码应包含数字、大小写字母、特殊字符的两种或两种以上"
-
case: "密码长度不对"
version: 7.48.0
change_type: 1
new_password: 12345
repeat_password: 12345
assert: "密码长度在6-16位之间"
-
case: "两次输入密码不一致"
version: 7.48.0
change_type: 1
new_password: 123456
repeat_password: 1234567
assert: "两次输入的密码不一致"
-
case: "修改密码成功"
version: 7.48.0
change_type: 1
new_password: ceshi123
repeat_password: ceshi123
assert1: 0
-
case: "修改密码成功2"
version: 7.47.0
change_type: 1
new_password: 123456
repeat_password: 123456
assert1: 0
change_pwdd:
#修改密码
-
case: "新密码不可与旧密码相同"
version: 7.47.0
change_type: 0
password: 123456
new_password: 123456
repeat_password: 123456
assert: "新密码不可与旧密码相同"
-
case: "密码不符合要求"
version: 7.48.0
change_type: 0
password: 123456
new_password: 123456
repeat_password: 123456
assert: "密码应包含数字、大小写字母、特殊字符的两种或两种以上"
-
case: "密码长度不对"
version: 7.48.0
change_type: 0
password: 123456
new_password: 12345
repeat_password: 12345
assert: "密码长度在6-16位之间"
-
case: "两次输入密码不一致"
version: 7.48.0
change_type: 0
password: 123456
new_password: 123456
repeat_password: 1234567
assert: "两次输入的密码不一致"
-
case: "修改密码成功"
version: 7.48.0
change_type: 0
password: 123456
new_password: ceshi123
repeat_password: ceshi123
assert: 0
-
case: "修改密码成功2"
version: 7.47.0
change_type: 0
password: 123456
new_password: 123456
repeat_password: 123456
assert: 0
-
case: "新用户设置密码-密码不符合要求"
version: 7.48.0
change_type: 0
password: {}
new_password: 123456
repeat_password: 123456
assert: "密码应包含数字、大小写字母、特殊字符的两种或两种以上"
check_pwd:
#点击修改密码时获取用户信息
-
case: "点击修改密码时成功获取用户信息"
assert: 0
\ No newline at end of file
verification_code:
-
#发送验证码
case: "发送验证码"
phone: 12345678999
type: 2
verifier: 'fd94aa08c242a00496aba1e5b556c436'
assert: 0
......@@ -8,7 +8,9 @@ beautycard_skus:
sort_type: "0"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SKU导入,商品默认排序
......@@ -19,7 +21,9 @@ beautycard_skus:
sort_type: "0"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SPU导入,商品价格最低
......@@ -30,7 +34,9 @@ beautycard_skus:
sort_type: "2"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SKU导入,商品价格最低
......@@ -41,7 +47,9 @@ beautycard_skus:
sort_type: "2"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SPU导入,商品销量最高
......@@ -52,7 +60,9 @@ beautycard_skus:
sort_type: "1"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SKU导入,商品销量最高
......@@ -63,7 +73,9 @@ beautycard_skus:
sort_type: "1"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SPU导入,商品最新上架
......@@ -74,7 +86,9 @@ beautycard_skus:
sort_type: "3"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SKU导入,商品最新上架
......@@ -85,7 +99,9 @@ beautycard_skus:
sort_type: "3"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SPU导入,修改城市筛选器为北京,商品正常召回
......@@ -96,7 +112,9 @@ beautycard_skus:
sort_type: "2"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SKU导入,修改城市筛选器为北京,商品正常召回
......@@ -107,7 +125,9 @@ beautycard_skus:
sort_type: "1"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SPU导入,接口返回字段正常case
......@@ -118,7 +138,9 @@ beautycard_skus:
sort_type: "0"
page: "0"
page_size: "20"
version: "7.47.0"
assert: 0
assert_message: ""
-
#更美次卡商品列表组件商品-按SKU导入,接口返回字段正常case
......@@ -129,4 +151,6 @@ beautycard_skus:
sort_type: "0"
page: "0"
page_size: "20"
assert: 0
\ No newline at end of file
version: "7.47.0"
assert: 0
assert_message: ""
#签到--其他tab 美购feed
service_list:
-
case: "签到--其他tab 美购feed 校验返回数据数"
assert: 0
len: 10
unit_id: 17923
\ No newline at end of file
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web3_request import web3_request
class TestConversationRobotGetPage:
data = BaseRequest().api_load(path_setting.ROBOTGETPAGE)
robot_get_page_case, robot_get_page_data = get_ids(data, "conversation_robot_get_page")
@pytest.mark.parametrize("param",robot_get_page_data,ids=robot_get_page_case)
def test_conversation_robot_get_page(self, param):
'''私信机器人-获取页面类型'''
r = web3_request().conversation_robot_get_page()
if r["error"] == 0:
#flows_list = r.get("data").get("flows_list", [])
assert r["data"]["1"] == param["assert1"]
assert r["data"]["2"] == param["assert2"]
assert r["data"]["3"] == param["assert3"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request
class TestDoctorDoctorlist:
data = BaseRequest().api_load(path_setting.DOCTORLIST)
doctor_doctorlist_case, doctor_doctorlist_data = get_ids(data, "doctor_doctorlist")
@pytest.mark.parametrize("param",doctor_doctorlist_data,ids=doctor_doctorlist_case)
def test_doctor_doctorlist(self, param):
'''医生列表'''
r = web_request().doctor_doctorlist(param['doctor_type'])
assert r["error"] == 0
assert r["data"]['doctors'] is not None and type(r["data"]['doctors']) is list
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request
class TestDoctorVerificationcode:
data = BaseRequest().api_load(path_setting.DOCTOR_VERIIFICATIONCODE)
doctor_verificationcode_case, doctor_verificationcode_data = get_ids(data, "doctor_verificationcode")
@pytest.mark.parametrize("param",doctor_verificationcode_data,ids=doctor_verificationcode_case)
def test_doctor_verificationcode(self, param):
'''医生列表'''
r = web_request().doctor_verificationcode(param['phone'])
assert r["error"] == 0
assert r['data']['code'] == param["code"]
assert r['data']['message'] == param["message"]
conversation_robot_get_page:
#私信机器人-获取页面类型
-
case: "私信机器人-获取页面类型"
#month: "2021-7"
assert1: "商品详情页"
assert2: "机构主页"
assert3: "医生主页"
doctor_doctorlist:
#医生后台-商户管理-医生管理列表case
-
case: "医生后台-商户管理-医生管理列表--已创建"
assert_size: 10
assert: 10
doctor_type: 0
-
case: "医生后台-商户管理-医生管理列表--审核中"
assert_size: 10
assert: 10
doctor_type: 1
\ No newline at end of file
doctor_verificationcode:
#医生后台-商户管理-医生管理列表--创建医生--医生发送验证码case
-
case: "医生后台-商户管理-医生管理列表--创建医生--医生发送验证码--发送不存在的用户的手机号"
assert_size: 10
assert: 10
phone: 12341234124
message: '请先用该号码在更美pc站或者app注册更美用户账号!'
code: 1
-
case: "医生后台-商户管理-医生管理列表--创建医生--医生发送验证码--发送存在的用户但是已经是医生账号的手机号"
assert_size: 10
assert: 10
phone: 12345654321
message: '该手机号已经注册为医生或机构,请更换手机号重新注册!'
code: 1
- case: "医生后台-商户管理-医生管理列表--创建医生--医生发送验证码--发送存在的用户但不是医生账号的手机号"
assert_size: 10
assert: 10
phone: 12341234121
message: '发送成功!'
code: 0
import pytest
import path_setting
from all_om_api.achelous_request import achelous_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestCategortAdd:
data = BaseRequest().api_load(path_setting.ACHELOUS_CATEGORY_ADD_DATA)
catalog_add_case, catalog_add_data = get_ids(data, 'catalog_add')
@pytest.mark.parametrize("param", catalog_add_data, ids=catalog_add_case)
def test_category_add(self, param):
import datetime
dt = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
r = achelous_request().catalog_add(param["tag_system_type"], param["tag_name"]+dt, param["father_tag_id"], param["child_tag_ids"], param["is_online"], param["is_display"], param["is_move"])
print(r)
import pytest
import path_setting
from all_om_api.achelous_request import achelous_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class 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_name"],param["is_online"], param["is_display"], param["is_move"], param["page"], param["size"])
# print(r)
if r["code"] == 0 and r["msg"] == "success":
assert len(r["data"]["data"]) > 0
#OM后台-商业分类管理,后台分类(工业),添加分类
catalog_add:
-
case: '工业分类,增加分类'
tag_system_type: 1
tag_name: "自动化接口测试添加"
father_tag_id: 15510
child_tag_ids: []
is_online: "false"
is_display: "false"
is_move: "false"
\ No newline at end of file
#OM后台-商业分类管理,后台分类(工业),标签排序
category_ordering:
-
case: '后台分类(工业) 上升'
tag_id: 1002463
tag_type: 1
tag_system_type: 1
operation_type: 1
-
case: '后台分类(工业) 下降'
tag_id: 1002463
tag_type: 1
tag_system_type: 1
operation_type: 2
\ No newline at end of file
#OM后台-商业分类管理,后台分类(工业)
industry_search:
-
case: '搜索口腔标签'
tag_system_type: 1
tag_name: "白"
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