Commit 59f93653 authored by 林颖's avatar 林颖

Merge branch 'common_dev' into ly_dev

# Conflicts:
#	test_backend_data/topic_data/topic_reply_create.yaml
parents 42b69417 8b575b7b
......@@ -14,7 +14,7 @@ class diary_request(BaseRequest):
def diary_cancelfavor(self):
return self.api_send(self.data["cancelfavor"])
# 更新日记本 无权限
# 更新日记本信息
def diary_operation(self, diary_id, title, operation_timestamp, doctor_name, hospital_name):
self.params["diary_id"] = diary_id
self.params["title"] = title
......
......@@ -49,6 +49,27 @@ class feed_request(BaseRequest):
return self.api_send(self.data["free_recruit_list"])
# 免费招募活动详情
def free_recruit_detail(self, current_city_id, id):
self.params["current_city_id"] = current_city_id
self.params["id"] = id
return self.api_send(self.data["free_recruit_detail"])
# 招募活动获取用户抽奖状态
def user_status(self, current_city_id, recruit_id):
self.params["current_city_id"] = current_city_id
self.params["recruit_id"] = recruit_id
return self.api_send(self.data["user_status"])
# 招募活动获取中奖名单
def winning_user_lis(self, recruit_id, json):
self.params["recruit_id"] = recruit_id
self.params["json"] = json
return self.api_send(self.data["winning_user_lis"])
if __name__ == '__main__':
print(feed_request().index_v9("choice", "7.42.2", "beijing"))
......@@ -60,4 +81,13 @@ if __name__ == '__main__':
print(feed_request().free_recruit_banner("7.44.1", " "))
# 免费招募列表
print(feed_request().free_recruit_list("7.44.1", " ", "1", "1", "10"))
\ No newline at end of file
print(feed_request().free_recruit_list("7.44.1", " ", "1", "1", "10"))
# 免费招募活动详情
print(feed_request().free_recruit_detail("beijing", "43"))
# 免费招募获取用户状态
print(feed_request().user_status("beijing", "43"))
# 免费招募查看中奖名单
print(feed_request().winning_user_lis("44", " "))
\ No newline at end of file
......@@ -55,4 +55,37 @@ free_recruit_list:
size: ${size}
data:
json: { }
isLogin: 1
#招募活动详情
free_recruit_detail:
method: get
url: /api/feed/free_recruit/detail
params:
current_city_id: ${current_city_id}
id: ${id}
data:
json: { }
isLogin: 1
#招募活动详情
user_status:
method: get
url: /api/feed/free_recruit/user_status
params:
current_city_id: ${current_city_id}
recruit_id: ${recruit_id}
data:
json: { }
isLogin: 1
#招募活动查看中奖名单
winning_user_lis:
method: get
url: /api/feed/free_recruit/winning_user_list
params:
recruit_id: ${recruit_id}
json: ${json}
data:
json: { }
isLogin: 1
\ No newline at end of file
import path_setting
from in_common.base_request import BaseRequest
class live_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.LIVESERVICES_CONFIG)
self.data = self.api_load(path_setting.LIVEGIFTS_CONFIG)
self.data = self.api_load(path_setting.SEARCHSERVICE_CONFIG)
self.data = self.api_load(path_setting.ADDLIVESERVICE_CONFIG)
self.data = self.api_load(path_setting.DELETELIVESERVICE_CONFIG)
self.data = self.api_load(path_setting.DELETEGIFT_CONFIG)
#主播-推荐袋美购列表展示
def live_services(self, channel_id, stream_id, offset, size):
self.params["channel_id"] = channel_id
self.params["stream_id"] = stream_id
self.params["offset"] = offset
self.params["size"] = size
return self.api_send(self.data["live_services"])
#主播-推荐袋美券列表展示
def live_gifts(self, channel_id, gift_type, stream_id, offset, size):
self.params["channel_id"] = channel_id
self.params["gift_type"] = gift_type
self.params["stream_id"] = stream_id
self.params["offset"] = offset
self.params["size"] = size
return self.api_send(self.data["live_gifts"])
#主播-推荐袋商品捜索功能
def search_service(self, current_city_id, channel_id, query, offset, size, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["current_city_id"] = current_city_id
self.params["channel_id"] = channel_id
self.params["query"] = query
self.params["offset"] = offset
self.params["size"] = size
self.params["version"] = version
return self.api_send(self.data["search_service"])
#主播-推荐袋美券捜索功能
def search_gifts(self, current_city_id, channel_id, gift_type, offset, size, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["current_city_id"] = current_city_id
self.params["channel_id"] = channel_id
self.params["gift_type"] = gift_type
self.params["offset"] = offset
self.params["size"] = size
self.params["version"] = version
return self.api_send(self.data["search_gifts"])
#主播-推荐袋添加商品
def add_live_service(self, channel_id, service_item_ids, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
self.params["service_item_ids"] = service_item_ids
self.params["version"] = version
return self.api_send(self.data["add_live_service"])
#主播-推荐袋删除商品
def delete_live_service(self, channel_id, live_service_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
self.params["live_service_id"] = live_service_id
self.params["version"] = version
return self.api_send(self.data["delete_live_service"])
#主播-推荐袋删除美券
def delete_live_gift(self, channel_id, gift_id, gift_type, stream_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
self.params["gift_id"] = gift_id
self.params["gift_type"] = gift_type
self.params["stream_id"] = stream_id
self.params["version"] = version
return self.api_send(self.data["delete_live_gift"])
if __name__ == '__main__':
print(live_request().live_services("745", "4177", "0", "10"))
print(live_request().search_service("beijing", "745", "", "0", "20", "7.45.0"))
print(live_request().add_live_service("745", "560641", "7.45.0"))
print(live_request().delete_live_service("745", "7242", "7.45.0"))
\ No newline at end of file
#主播-推荐袋美购列表展示
live_services:
method: GET
url: /api/janus/live/live_services
params:
channel_id: ${channel_id}
stream_id: ${stream_id}
offset: ${offset}
size: ${size}
data: {}
json: {}
isLogin: 1
#主播-推荐袋美券列表展示
live_gifts:
method: GET
url: /api/janus/live/live_gifts
params:
channel_id: ${channel_id}
gift_type: ${gift_type}
stream_id: ${stream_id}
offset: ${offset}
size: ${size}
data: {}
json: {}
isLogin: 1
#主播-推荐袋商品捜索功能
search_service:
method: GET
url: /api/janus/live/search_service
params:
current_city_id: ${current_city_id}
channel_id: ${channel_id}
query: ${query}
offset: ${offset}
size: ${size}
version: ${version}
data: {}
json: {}
isLogin: 1
#主播-推荐袋添加商品
add_live_service:
method: POST
url: /api/janus/live/add_live_service
params:
version: ${version}
data:
channel_id: ${channel_id}
service_item_ids: ${service_item_ids}
json: {}
isLogin: 1
#主播-推荐袋删除商品
delete_live_service:
method: POST
url: /api/janus/live/delete_live_service
params:
version: ${version}
data:
channel_id: ${channel_id}
live_service_id: ${live_service_id}
json: {}
isLogin: 1
#主播-推荐袋删除美券
delete_live_gift:
method: POST
url: /api/janus/live/delete_live_gift
params:
version: ${version}
data:
channel_id: ${channel_id}
gift_id: ${gift_id}
gift_type: ${gift_type}
stream_id: ${stream_id}
json: {}
isLogin: 1
......@@ -22,6 +22,9 @@ class janus_request(BaseRequest):
#次卡商详页
self.data = self.api_load(path_setting.BEAUTY_CARD_DETAIL_CONFIG)
#直播polling循环
self.data = self.api_load(path_setting.POLLING_CONFIG)
#搜索结果页-综合/百科tab
def content_v7(self, query, device_id, current_city_id, version, is_first, tab_type, offset):
#搜索词
......@@ -230,6 +233,13 @@ class janus_request(BaseRequest):
return self.api_send(self.data["page_rules"])
#直播poling循环
def polling(self,stream_id,is_first):
self.params["stream_id"] = stream_id
self.params["is_first"] = is_first
return self.api_send(self.data["polling"])
if __name__ == '__main__':
......@@ -303,6 +313,7 @@ if __name__ == '__main__':
# print(janus_request().beauty_card_refund_submit("102813852173916", 3, "个人身体原因", 0))
print(janus_request().beauty_card_order_detail(102247770691611))
# print(janus_request().product_my_list(0, 0))
#直播-点击【设置封面】
print("直播-点击【设置封面】")
print(janus_request().page_rules("744.2", "beijing", "post_add_pic"))
......
......@@ -312,3 +312,15 @@ feed_service:
data: {}
json: {}
isLogin: 0
#直播polling循环
polling:
method: get
url: /api/janus/live/polling
params:
stream_id: ${stream_id}
is_first: ${is_first}
data: {}
json: {}
......@@ -22,6 +22,7 @@ class living_request(BaseRequest):
return self.api_send(self.data["pushlive_info"])
if __name__ == '__main__':
(living_request().danmu_v2("739", "1"))
(living_request().pushlive_info("小冤家", "2021/04/22/1003/cef471cff5e6", "", "1", "1", "1"))
\ No newline at end of file
......@@ -24,3 +24,32 @@ pushlive_info:
json: {}
isLogin: 1
#主播-推荐袋美购列表展示
live_services:
method: GET
url: /api/janus/live/live_services
params:
channel_id: ${channel_id}
stream_id: ${stream_id}
offset: ${offset}
size: ${size}
data: {}
json: {}
isLogin: 1
#主播-推荐袋商品捜索功能
search_services:
method: GET
url: /api/janus/live/search_services
params:
current_city_id: ${current_city_id}
channel_id: ${channel_id}
query: ${query}
offset: ${offset}
size: ${size}
trace_id: ${trace_id}
data: {}
json: {}
isLogin: 1
......@@ -52,7 +52,11 @@ class search_request(BaseRequest):
self.params["device_id"] = device_id
return self.api_send(self.data["hospital"])
if __name__ == '__main__':
# 打印购物车-猜你喜欢列表接口返回
print(search_request().hospital(82, [], "眼部整形", 10, "869378034450718"))
......@@ -48,4 +48,5 @@ hospital:
count: ${count}
device_id: ${device_id}
data: {}
json: {}
\ No newline at end of file
json: {}
......@@ -12,8 +12,6 @@ class user_request(BaseRequest):
return self.api_send(self.data["personal_center"])
def __init__(self):
self.data = self.api_load(path_setting.USER_ANSWER_CONFIG)
......@@ -32,7 +30,38 @@ class user_request(BaseRequest):
def topic_canclefavor(self):
return self.api_send(self.data["canclefavor"])
#关注主播
def follow_add(self,uid,from_live):
self.params["uid"] = uid
self.params["from_live"] = from_live
return self.api_send(self.data['follow_add'])
#取消关注
def follow_del(self,uid,from_live):
self.params["uid"] = uid
self.params["from_live"] = from_live
return self.api_send(self.data["follow_del"])
#我的-日记
def my_diary_v2(self, start_num, count):
self.params["start_num"] = start_num
self.params["count"] = count
return self.api_send(self.data["my_diary_v2"])
# 我的-日记
def user_tractate(self, page, count):
self.params["page"] = page
self.params["count"] = count
return self.api_send(self.data["user_tractate"])
if __name__ == '__main__':
#个人中心
......@@ -45,6 +74,11 @@ if __name__ == '__main__':
# 日记贴收藏&取消收藏
# print(user_request().topic_favor())
# print(user_request().topic_canclefavor())
print(user_request().follow_del("33909625","4196"))
#我的-日记
print(user_request().my_diary_v2(0, 10))
#我的-帖子
print(user_request().user_tractate(1, 10))
......@@ -38,3 +38,50 @@ canclefavor:
json: {}
isLogin: 1
<<<<<<< HEAD
#直播-关注主播
follow_add:
method: post
url: /api/user/follow/add
params: {}
data:
uid: ${uid}
from_live: ${from_live}
json: {}
isLogin: 1
#直播-取消关注
follow_del:
method: post
url: /api/user/follow/del
params: {}
data:
uid: ${uid}
from_live: ${from_live}
json: {}
isLogin: 1
=======
# 我的-日记
my_diary_v2:
method: GET
url: /api/user/my_diary/v2
params:
start_num: ${start_num}
count: ${count}
data: {}
json: {}
isLogin: 1
# 我的-帖子
user_tractate:
method: GET
url: /api/user/tractate
params:
page: ${page}
count: ${count}
data: {}
json: {}
isLogin: 1
......@@ -3,3 +3,4 @@ develop_host:
om: http://om.paas-develop.env
doctor: http://doctor.paas-develop.env
# backend_online: https://backend.igengmei.com
......@@ -538,5 +538,64 @@ FREE_RECRUIT_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_
PAGE_RULES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
PAGE_RULES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "page_rules.yaml")
#直播polling循环
POLLING_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
POLLING = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "polling.yaml")
#直播关注/取关主播
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")
#主播-推荐袋美购列表展示
LIVESERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
LIVESERVICES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "live_services.yaml")
#主播-推荐袋美券列表展示
LIVEGIFTS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
LIVEGIFTS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "live_gifts.yaml")
#主播-推荐袋商品搜索功能
SEARCHSERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
SEARCHSERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "search_service.yaml")
#主播-推荐袋美券搜索功能
SEARCHGIFTS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
SEARCHGIFTS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "search_gifts.yaml")
#主播-推荐袋添加商品
ADDLIVESERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
ADDLIVESERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "add_live_service.yaml")
#主播-推荐袋删除商品
DELETELIVESERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
DELETELIVESERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "delete_live_service.yaml")
#主播-推荐袋删除美券
DELETEGIFT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
DELETEGIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "delete_live_gift.yaml")
#免费招募活动详情
FREE_RECRUIT_DETAIL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
FREE_RECRUIT_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "free_recruit_detail.yaml")
#免费招募获取用户抽奖状态
USER_STATUS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
USER_STATUS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "user_status.yaml")
#免费招募活动查看中奖名单
WINNING_USER_LIST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
WINNING_USER_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "winning_user_lis.yaml")
#我的-日记
MY_DIARY_V2_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
MY_DIARY_V2 = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "my_diary_v2.yaml")
#我的-帖子
USER_TRACTATE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
USER_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "user_tractate.yaml")
if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG)
......@@ -7,36 +7,25 @@ from all_backend_api.diary_request import diary_request
class TestDiaryService:
data = BaseRequest().api_load(path_setting.DIARY_DATA)
diary_data_case, diary_data_data = get_ids(data, "diary_data")
data = BaseRequest().api_load(path_setting.DIARY_SERVICE)
diary_service_case, diary_service_data = get_ids(data, "diary_service")
@pytest.mark.parametrize("param",diary_data_data,ids=diary_data_case)
def test_diary_service(self,param):
@pytest.mark.parametrize("param", diary_service_data,ids=diary_service_case)
def test_diary_service(self, param):
# print(2)
r = diary_request().diary_data(param["current_city_id"], param["diary_referrer"], param["sort"], param["count"], param["start_num"])
r = diary_request().diary_service( param["diary_id"], param["service_id"])
# print(r)
if r["error"] == 0:
assert r["error"] == param["assert"]
# 先判断有没有日记,然后判断日记本里面需要的那些字段,如点赞字段,日记总数等,不传值,传空值
if r["data"]:
assert r["data"][0]["post_date"] is not None and r["data"][0]["post_date"] is not "" #c创建时间
assert r["data"][0]["diary_num"] is not None and r["data"][0]["diary_num"] is not "" #日记总数
assert r["data"][0]["view_count"] is not None and r["data"][0]["view_count"] is not "" #浏览次数
assert r["data"][0]["is_liked"] is not None and r["data"][0]["is_liked"] is not "" #是否点赞
assert r["data"][0]["operation_day"] is not None and r["data"][0]["operation_day"] is not "" #术后多少天
assert r["data"][0]["vote_count"] is not None and r["data"][0]["vote_count"] is not "" #点赞总数
assert r["data"][0]["reply_count"] is not None and r["data"][0]["reply_count"] is not ""#评论总数
assert r["data"][0]["id"] is not None and r["data"][0]["id"] is not ""#日记贴id
# 判断评论列表里面的用户信息是否为空,先判断有没有评论
if r["data"][0]["comments"]:
assert r["data"][0]["comments"][0]["user_id"] is not None and r["data"][0]["comments"][0]["user_id"] is not ""#用户id
assert r["data"][0]["comments"][0]["nick_name"] is not None and r["data"][0]["comments"][0]["nick_name"] is not ""#用户名
assert r["data"][0]["comments"][0]["gm_url"] is not None and r["data"][0]["comments"][0]["gm_url"] is not ""#点击头像跳转链接
# assert(r[""])
if r["error"] == 1:
assert r["error"] == param["assert"]
# 先判断有没有美购的字段,没有就检验接口就行,然后判断接口里面需要的那些字段是否不传值,传空值
if r["data"]["service_data"]:
assert r["data"]["service_data"]["gengmei_price"] is not None and r["data"]["service_data"]["gengmei_price"] is not "" # 更美价
assert r["data"]["service_data"]["service_name"] is not None and r["data"]["service_data"]["service_name"] is not "" # 美购名称
assert r["data"]["service_data"]["gm_url"] is not None and r["data"]["service_data"]["gm_url"] is not "" # 跳转链接
assert r["data"]["service_data"]["is_seckill"] is not None and r["data"]["service_data"]["is_seckill"] is not "" # 是否秒杀
......
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.feed_request import feed_request
class TestFreeRecruitDetail:
data = BaseRequest().api_load(path_setting.FREE_RECRUIT_DETAIL)
free_recruit_detail_case, free_recruit_detail_data = get_ids(data, "free_recruit_detail")
@pytest.mark.parametrize("param", free_recruit_detail_data, ids=free_recruit_detail_case)
def test_free_recruit_detail_case(self, param):
r = feed_request().free_recruit_detail(param["current_city_id"], param["id"])
if r["error"] == 0:
assert r["data"]["free_recruit"]["id"] != param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.feed_request import feed_request
class TestUserStatus:
data = BaseRequest().api_load(path_setting.USER_STATUS)
user_status_case, user_status_data = get_ids(data, "user_status")
@pytest.mark.parametrize("param", user_status_data, ids=user_status_case)
def test_user_status_case(self, param):
r = feed_request().user_status(param["current_city_id"], param["id"])
if r["error"] == 0:
assert r["data"]["is_regist"] == param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.feed_request import feed_request
class TestWinningUserList:
data = BaseRequest().api_load(path_setting.WINNING_USER_LIST)
winning_user_list_case, winning_user_list_data = get_ids(data, "winning_user_lis")
@pytest.mark.parametrize("param", winning_user_list_data, ids=winning_user_list_case)
def test_winning_user_list_case(self, param):
r = feed_request().winning_user_lis(param["recruit_id"], param["json"])
if r["error"] == 0:
assert r["data"]["users"][0]["id"] != param["assert"]
......@@ -14,6 +14,18 @@ class TestBeautyCardOrderConfirm:
def test_beauty_card_order_confirm(self, param):
r = janus_request().beauty_card_order_confirm(param["sku_id"], param["number"], param["use_bc_coupon"], param["bc_coupon_id"])
if r["error"] == 0:
if param["number"] == 1: #购买1个sku时
assert r["error"] == param["assert_error"]
assert r["data"]["payment_total_price"] == param["assert_total_price"]
assert r["data"]["payment_total_fee"] == param["assert_total_fee"]
assert r["data"]["user_buy_lower_limit"] == param["assert_user_buy_lower_limit"]
assert r["data"]["user_buy_upper_limit"] == param["assert_user_buy_upper_limit"]
assert r["data"]["is_doctor_see"] == param["assert_is_doctor_see"]
if param["number"] == 2: #购买2个sku时
assert r["error"] == param["assert_error"]
assert r["data"]["payment_total_price"] == param["assert_total_price"]
assert r["data"]["payment_total_fee"] == param["assert_total_fee"]
assert r["data"]["user_buy_lower_limit"] == param["assert_user_buy_lower_limit"]
assert r["data"]["user_buy_upper_limit"] == param["assert_user_buy_upper_limit"]
......@@ -16,6 +16,13 @@ class TestBeautyCardOrderSubmit:
param["is_doctor_see"], param["gain_coupon_id"],
param["deduction_price"])
if r["error"] == 0:
if param["is_doctor_see"] == 1 and param["number"] == 1:
assert r["error"] == param["assert_error"]
assert r["data"]["status"] == param["assert_status"]
if param["is_doctor_see"] == 0 and param["number"] == 1:
assert r["error"] == param["assert_error"]
assert r["data"]["status"] == param["assert_status"]
if param["number"] == 2:
assert r["error"] == param["assert_error"]
assert r["data"]["status"] == param["assert_status"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.janus_request import janus_request
class TestPolling:
data = BaseRequest().api_load(path_setting.POLLING)
polling_case, polling_data = get_ids(data, "polling")
print('polling_data:',polling_data)
@pytest.mark.parametrize("param",polling_data,ids=polling_case)
def test_polling(self,param):
print(param)
r = janus_request().polling(param["stream_id"],param["is_first"])
print(r)
if r["error"] == 0:
assert r["data"]["delay"] == param["assert"]
\ 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 TestAddLiveService:
data = BaseRequest().api_load(path_setting.ADDLIVESERVICE)
addliveservice_case, addliveservice_data = get_ids(data, "add_live_service")
@pytest.mark.parametrize("param", addliveservice_data, ids=addliveservice_case)
def test_add_live_service(self, param):
print(111111111111111111111)
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
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 TestDeleteLiveGift:
data = BaseRequest().api_load(path_setting.DELETEGIFT)
deletelivegift_case, deletelivegift_data = get_ids(data, "delete_live_gift")
@pytest.mark.parametrize("param", deletelivegift_data, ids=deletelivegift_case)
def test_delete_live_gift(self, param):
print(111111111111111111111)
r = live_request().delete_live_gift(param["channel_id"], param["gift_id"], param["stream_id"], param["gift_type"], param["version"])
if r["error"] == 0:
assert r["data"]["toast"] == param["assert"]
\ 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 TestDeleteLiveService:
data = BaseRequest().api_load(path_setting.DELETELIVESERVICE)
deleteliveservice_case, deleteliveservice_data = get_ids(data, "delete_live_service")
@pytest.mark.parametrize("param", deleteliveservice_data, ids=deleteliveservice_case)
def test_delete_live_service(self, param):
print(111111111111111111111)
r = live_request().delete_live_service(param["channel_id"], param["live_service_id"], param["version"])
if r["error"] == 0:
assert r["data"]["toast"] == param["assert"]
\ 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 TestLiveGifts:
data = BaseRequest().api_load(path_setting.LIVEGIFTS)
livegifts_case, livegifts_data = get_ids(data, "live_gifts")
@pytest.mark.parametrize("param", livegifts_data, ids=livegifts_case)
def test_live_gifts(self, param):
print(111111111111111111111)
r = live_request().live_gifts(param["channel_id"], param["gift_type"], param["stream_id"], param["offset"], param["size"])
if r["error"] == 0:
assert r["data"]["offset"] == param["assert"]
\ 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 TestLiveServices:
data = BaseRequest().api_load(path_setting.LIVESERVICES)
liveservices_case, liveservices_data = get_ids(data, "live_services")
@pytest.mark.parametrize("param", liveservices_data, ids=liveservices_case)
def test_live_services(self, param):
print(111111111111111111111)
r = live_request().live_services(param["channel_id"], param["stream_id"], param["offset"], param["size"])
if r["error"] == 0:
assert r["data"]["offset"] == param["assert"]
\ 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 TestSearchService:
data = BaseRequest().api_load(path_setting.SEARCHSERVICE)
searchservice_case, searchservice_data = get_ids(data, "search_service")
@pytest.mark.parametrize("param", searchservice_data, ids=searchservice_case)
def test_search_service(self, param):
print(111111111111111111111)
r = live_request().search_service(param["current_city_id"], param["channel_id"], param["query"], param["offset"], param["size"], param["version"])
if r["error"] == 0:
assert r["data"]["services"] != param["assert"]
\ No newline at end of file
......@@ -18,5 +18,16 @@ class TestShareV4:
def test_share_v4(self,param):
r = oneimage_request().share_v4(param["version"], param["face_id"])
assert r["error"] == 0
face_name = r["data"]["face_desc"]["face_name"]
assert face_name is not None
classification_info = r["data"]["classification_info"]
# 测颜值结果,保证五官有值
for key,value in classification_info.items():
print(key, value["name"], value["param"])
assert value["name"] is not None
assert value["param"] is not None
# 颜值报告
content = r["data"]["tractate_info"]["content"]
print(content)
assert content is not None
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
import json
class TestFollowAdd:
data = BaseRequest().api_load(path_setting.FOLLOW_ADD)
follow_add_case, follow_add_data = get_ids(data, "follow_add")
@pytest.mark.parametrize("param",follow_add_data, ids=follow_add_case)
def test_follow_add(self, param):
r = user_request().follow_add(param["uid"], param["from_live"])
# r=json.loads(r)
# print("---------",r,type(r))
if r["error"] == 0:
assert r["error"] == param["assert"]
if r["error"] == 1:
assert r["message"] == param["assert1"]
\ 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 TestFollowDel:
data = BaseRequest().api_load(path_setting.FOLLOW_DEL)
follow_del_case, follow_del_data = get_ids(data,"follow_del")
@pytest.mark.parametrize("param", follow_del_data, ids=follow_del_case)
def test_follow_del(self,param):
r = user_request().follow_del(param["uid"], param["from_live"])
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.user_request import user_request
class TestMyDiaryV2:
data = BaseRequest().api_load(path_setting.MY_DIARY_V2)
mydiaryv2_case, mydiaryv2_data = get_ids(data, "my_diary_v2")
@pytest.mark.parametrize("param", mydiaryv2_data, ids=mydiaryv2_case)
def test_my_diary_v2(self, param):
r = user_request().my_diary_v2(param["start_num"], param["count"])
if r["error"] == 0:
# assert r["data"]["diaries"] >= param["assert"]
assert len(r["data"]["diaries"]) >= param["assert"]
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 TestUserTractate:
data = BaseRequest().api_load(path_setting.USER_TRACTATE)
user_tractate_case, user_tractate_data = get_ids(data, "user_tractate")
@pytest.mark.parametrize("param", user_tractate_data, ids=user_tractate_case)
def test_user_tractate(self, param):
r = user_request().user_tractate(param["page"], param["count"])
if r["error"] == 0:
assert len(r["data"]["tractates"]) >= param["assert"]
diary_service:
#字段正常case
-
case: "有推荐美购的日记--有外显评论"
diary_id: ""
service_id: 5815774
case: "有推荐美购的日记"
diary_id: 17586147
service_id: 5878139
assert: 0
-
case: "接口传参数失败,但不报错case"
current_city_id: "beijing"
diary_referrer: "my_diary"
sort: 0
count: 8
start_num: 2
case: "已下线的推荐美购的日记"
diary_id: 17586094
service_id: 5885050
assert: 0
- case: "没有推荐美购的日记"
diary_id: 17586140
service_id:
assert: 0
free_recruit_detail:
#社区免费招募活动详情
-
case: "招募活动详情图片"
current_city_id: "beijing"
assert: null
id: 43
user_status:
#免费招募获取用户抽奖状态
-
case: "招募活动获取用户抽奖"
current_city_id: "beijing"
assert: true
id: 43
winning_user_lis:
#免费招募活动查看中奖名单
-
case: "招募活动查看中奖名单"
recruit_id: "44"
json:
assert: null
beauty_card_order_confirm:
-
case: "次卡-确认订单-接口调用成功case"
case: "次卡-确认订单-sku数量为1"
sku_id: "10176"
number: 1
use_bc_coupon: 1
bc_coupon_id: 0
assert_error: 0
assert_error: 0 #校验接口调用成功case
assert_total_price: "2.00" #校验订单总金额case
assert_total_fee: "2.00" #校验实付金额case
assert_user_buy_lower_limit: 1 #校验最少购买数case
assert_user_buy_upper_limit: 3 #校验最多购买数case
assert_is_doctor_see: true #校验是否同意商家电话咨询case
-
case: "次卡-确认订单-sku数量为2"
sku_id: "10176"
number: 2
use_bc_coupon: 1
bc_coupon_id: 0
assert_error: 0 #校验接口调用成功case
assert_total_price: "4.00" #校验订单总金额case
assert_total_fee: "4.00" #校验实付金额case
assert_user_buy_lower_limit: 1 #校验最少购买数case
assert_user_buy_upper_limit: 3 #校验最多购买数case
beauty_card_order_submit:
-
case: "次卡-提交订单-校验接口返回成功case"
case: "次卡-提交订单-同意商家咨询"
phone: "12345678912"
sku_id: "10176"
number: 1
is_doctor_see: 1
gain_coupon_id: 0
deduction_price: 0
assert_error: 0
\ No newline at end of file
assert_error: 0
assert_status: 1
-
case: "次卡-提交订单-不同意商家咨询"
phone: "12345678912"
sku_id: "10176"
number: 1
is_doctor_see: 0
gain_coupon_id: 0
deduction_price: 0
assert_error: 0
assert_status: 1
-
case: "次卡-提交订单-购买数量为2"
phone: "12345678912"
sku_id: "10176"
number: 2
is_doctor_see: 1
gain_coupon_id: 0
deduction_price: 0
assert_error: 0
assert_status: 1
\ No newline at end of file
#polling_vfc:
polling:
#循环成功
-
case: "polling循环成功"
stream_id: "2334"
is_first: "0"
assert: 10
\ No newline at end of file
add_live_service:
#主播-推荐袋添加商品-添加一个商品
-
case: "主播-推荐袋添加商品-添加一个商品"
channel_id: "747"
service_item_ids: "560641"
version: "7.45.0"
assert : 成功添加1件商品
#主播-推荐袋添加商品-添加多个商品
-
case: "主播-推荐袋添加商品-添加多个商品"
channel_id: "747"
service_item_ids: "108278,578088,585823"
version: "7.45.0"
assert : 成功添加3件商品
\ No newline at end of file
delete_live_gift:
#主播-推荐袋删除美券-美券成功删除
-
case: "主播-推荐袋删除美券-美券成功删除"
channel_id: "745"
gift_id: "59088"
gift_type: "1"
stream_id: "4207"
version: "7.45.0"
assert : 美券已删除
\ No newline at end of file
delete_live_service:
#主播-推荐袋删除商品-商品成功删除
-
case: "主播-推荐袋删除商品-商品成功删除"
channel_id: "745"
live_service_id: "7251"
version: "7.45.0"
assert : 商品已删除
\ No newline at end of file
live_gifts:
#主播-推荐袋美券列表正常展示
-
case: "主播-推荐袋美券列表正常展示"
channel_id: "745"
gift_type: "3"
stream_id: "4205"
offset: "0"
size: "20"
assert : 0
live_services:
#主播-推荐袋美购列表正常展示
-
case: "主播-推荐袋美购列表正常展示"
channel_id: "746"
stream_id: "4181"
offset: "0"
size: "20"
assert : 20
search_service:
#主播-推荐袋商品搜索功能
-
case: "主播-推荐袋商品搜索功能"
current_city_id: "beijing"
channel_id: "745"
query: ""
offset: "0"
size: "20"
version: "7.45.0"
assert : 0
#主播-推荐袋商品搜索功能-捜索双眼皮
-
case: "主播-推荐袋商品搜索功能-捜索双眼皮"
current_city_id: "beijing"
channel_id: "745"
query: "双眼皮"
offset: "0"
size: "20"
version: "7.45.0"
assert : 0
......@@ -3,7 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-07-13 10:18:20
content: ces测试+2021-07-09 19:39:05
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......
follow_add:
#关注
-
case: "关注主播"
uid: 33909625
from_live: 4196
assert: 0
assert1: 请登录后再试
#未登录
# -
# case: "未登录"
# uid: 33909625
# from_live: 4196
#assert1: 请登录后再试
follow_del:
#取消关注
-
case: "取消关注"
uid: 33909625
from_live: 4196
assert: 0
my_diary_v2:
#我的-日记
-
case: "我的页面-日记"
start_num: 0
count: 20
assert: 0
user_tractate:
-
#我的-帖子
case: "我的页面-帖子"
page: 1
count: 10
assert: 0
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