Commit 64702c5c authored by 张淑琴's avatar 张淑琴

Merge branch 'common_dev' into zzsq_dev

parents 6b138d7a 42a634a6
...@@ -10,10 +10,11 @@ class feed_request(BaseRequest): ...@@ -10,10 +10,11 @@ class feed_request(BaseRequest):
self.data = self.api_load(path_setting.FREE_RECRUIT_BANNER_CONFIG) 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["tabtype"] = tabtype
self.params["version"] = version self.params["version"] = version
self.params["current_city_id"] = current_city_id self.params["current_city_id"] = current_city_id
self.params["tab_id"] = tab_id
return self.api_send(self.data["index_v9"]) return self.api_send(self.data["index_v9"])
......
...@@ -5,6 +5,7 @@ index_v9: ...@@ -5,6 +5,7 @@ index_v9:
tabtype: ${tabtype} tabtype: ${tabtype}
version: ${version} version: ${version}
current_city_id: ${current_city_id} current_city_id: ${current_city_id}
tab_id: ${tab_id}
data: data:
json: {} json: {}
isLogin: 1 isLogin: 1
......
...@@ -97,12 +97,11 @@ class janus_request(BaseRequest): ...@@ -97,12 +97,11 @@ class janus_request(BaseRequest):
return self.api_send(self.data["service_promotion_related_service_data"]) return self.api_send(self.data["service_promotion_related_service_data"])
# 品类聚合页面商品列表 # 品类聚合页面商品列表
def tag_service(self, size, tag_ids, offset, tag_id, version, device_id): def tag_service(self, size, tag_ids, offset, version, device_id):
print("fgx") print("fgx")
self.params['size'] = size self.params['size'] = size
self.params['tag_ids'] = tag_ids self.params['tag_ids'] = tag_ids
self.params['offset'] = offset self.params['offset'] = offset
self.params['tag_id'] = tag_id
self.params['version'] = version self.params['version'] = version
self.params['device_id'] = device_id self.params['device_id'] = device_id
......
...@@ -92,7 +92,6 @@ tag_service: ...@@ -92,7 +92,6 @@ tag_service:
size: ${size} size: ${size}
tag_ids: ${tag_ids} tag_ids: ${tag_ids}
offset: ${offset} offset: ${offset}
tag_id: ${tag_id}
version: ${version} version: ${version}
device_id: ${device_id} device_id: ${device_id}
data: { } data: { }
......
...@@ -71,7 +71,7 @@ if __name__ == '__main__': ...@@ -71,7 +71,7 @@ if __name__ == '__main__':
# (living_request().danmu_v2("739", "1")) # (living_request().danmu_v2("739", "1"))
# (living_request().pushlive_info("小冤家", "2021/04/22/1003/cef471cff5e6", "", "1", "1", "1")) # (living_request().pushlive_info("小冤家", "2021/04/22/1003/cef471cff5e6", "", "1", "1", "1"))
# print (living_request().sendmsg("739","你好")) # 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().get_live_info_audience("745", "7.46.0"))
# print(living_request().replay_info("123456978", "746.0")) # print(living_request().replay_info("123456978", "746.0"))
print(living_request().replay_msg("123456978", "746.0")) # print(living_request().replay_msg("123456978", "746.0")
\ No newline at end of file \ No newline at end of file
...@@ -17,9 +17,9 @@ class services_request(BaseRequest): ...@@ -17,9 +17,9 @@ class services_request(BaseRequest):
def v1(self, coupon_info_id, order_by): def v1(self, coupon_info_id, order_by):
self.params["coupon_info_id"] = coupon_info_id self.params["coupon_info_id"] = coupon_info_id
self.params["order_by"] = order_by self.params["order_by"] = order_by
return self.api_send(self.data["share_data"]) return self.api_send(self.data["v1"])
if __name__ == '__main__': if __name__ == '__main__':
#打印商祥页-分享接口返回 #打印商祥页-分享接口返回
# print(services_request().share_data("5857263", "618788")) print(services_request().share_data("5857263", "618788"))
print(services_request().v1(32366785, 0)) # print(services_request().v1(32366785, 0))
\ No newline at end of file \ No newline at end of file
...@@ -10,7 +10,7 @@ share_data: ...@@ -10,7 +10,7 @@ share_data:
#获取美购列表,美券 #获取美购列表,美券
share_data: v1:
method: get method: get
url: /api/services/v1 url: /api/services/v1
params: params:
......
...@@ -28,12 +28,13 @@ class visual_beauty_card_request(BaseRequest): ...@@ -28,12 +28,13 @@ class visual_beauty_card_request(BaseRequest):
return self.api_send(self.data['beautycard_filters']) return self.api_send(self.data['beautycard_filters'])
#自定义专题-更美次卡商品列表组件商品 #自定义专题-更美次卡商品列表组件商品
def beautycard_skus(self, unit_id, tag_id, area, sort_type, page, page_size, device_id = '97B6764B-2135-4761-9911-701C38CBC272'): def beautycard_skus(self, unit_id, tag_id, area, sort_type, page, page_size, version, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
self.params["unit_id"] = unit_id self.params["unit_id"] = unit_id
self.params["tag_id"] = tag_id self.params["tag_id"] = tag_id
self.params["area"] = area self.params["area"] = area
self.params["sort_type"] = sort_type self.params["sort_type"] = sort_type
self.params["page"] = page self.params["page"] = page
self.params["page_size"] = page_size self.params["page_size"] = page_size
self.params["version"] = version
return self.api_send(self.data['beautycard_skus']) return self.api_send(self.data['beautycard_skus'])
\ No newline at end of file
...@@ -42,6 +42,8 @@ beautycard_skus: ...@@ -42,6 +42,8 @@ beautycard_skus:
page : ${page} page : ${page}
#分页大小 #分页大小
page_size : ${page_size} page_size : ${page_size}
#版本!!!
version : ${version}
data: {} data: {}
json: {} json: {}
...@@ -12,9 +12,18 @@ class TestIndexV9: ...@@ -12,9 +12,18 @@ class TestIndexV9:
@pytest.mark.parametrize("param",indexv9_data,ids=indexv9_case) @pytest.mark.parametrize("param",indexv9_data,ids=indexv9_case)
def test_index_v9(self,param): def test_index_v9(self,param):
r = feed_request().index_v9(param["tabtype"], param["version"], param["current_city_id"]) if param['tabtype'] == "customize_commodity" :
if r["error"] == 0: 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",[]) features = r.get("data").get("features",[])
assert len(features) > param["assert"] 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"]
...@@ -8,13 +8,13 @@ from all_backend_api.janus_request import janus_request ...@@ -8,13 +8,13 @@ from all_backend_api.janus_request import janus_request
class TestTagService: class TestTagService:
data = BaseRequest().api_load(path_setting.TAG_SERVICE) data = BaseRequest().api_load(path_setting.TAG_SERVICE)
tagservice_case, tagservice_data = get_ids(data, "tag_service") tag_service_case, tag_service_data = get_ids(data, "tag_service")
@pytest.mark.parametrize("param", tagservice_data, ids=tagservice_case) @pytest.mark.parametrize("param", tag_service_data, ids=tag_service_case)
def test_tag_service(self, param): def test_tag_service(self, param):
r = janus_request().tag_service(param["size"], param["tag_ids"], param["offset"], param["tag_id"], param["version"], param["device_id"]) r = janus_request().tag_service(param["size"], param["tag_ids"], param["offset"],
#print('feng=', r) param["version"], param["device_id"])
# print('feng=', r)
if r["error"] == 0: if r["error"] == 0:
assert r["error"] == param["assert"] assert r["error"] == param["assert"]
assert r["data"]["offset"] == param["offset"]
...@@ -2,6 +2,7 @@ import pytest ...@@ -2,6 +2,7 @@ import pytest
import path_setting import path_setting
from all_backend_api.janus_live_request import live_request 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 ids_list import get_ids
from in_common.base_request import BaseRequest from in_common.base_request import BaseRequest
...@@ -13,6 +14,14 @@ class TestAddLiveService: ...@@ -13,6 +14,14 @@ class TestAddLiveService:
@pytest.mark.parametrize("param", addliveservice_data, ids=addliveservice_case) @pytest.mark.parametrize("param", addliveservice_data, ids=addliveservice_case)
def test_add_live_service(self, param): def test_add_live_service(self, param):
print(111111111111111111111) 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"]) r = live_request().add_live_service(param["channel_id"], param["service_item_ids"], param["version"])
if r["error"] == 0: if r["error"] == 0:
assert r["data"]["toast"] == param["assert"] assert r["data"]["toast"] == param["assert"]
\ No newline at end of file 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
...@@ -13,7 +13,11 @@ class TestBeautyCardSkus: ...@@ -13,7 +13,11 @@ class TestBeautyCardSkus:
@pytest.mark.parametrize("param", beautycard_skus_data, ids=beautycard_skus_case) @pytest.mark.parametrize("param", beautycard_skus_data, ids=beautycard_skus_case)
def test_beautycard_skus(self, param): def test_beautycard_skus(self, param):
print('次卡商品列表组件商品') print('次卡商品列表组件商品')
r = visual_beauty_card_request().beautycard_skus(param["unit_id"], param["tag_id"], param["area"], param["sort_type"], param["page"], param["page_size"]) r = visual_beauty_card_request().beautycard_skus(param["unit_id"], param["tag_id"], param["area"], param["sort_type"], param["page"], param["page_size"], param["version"])
if r["data"]: if r["data"]:
print('次卡商品列表组件有商品召回') print('次卡商品列表组件有商品召回')
assert len(r["data"]["beautycards"]) != param["assert"] assert len(r["data"]["beautycards"]) != param["assert"]
\ No newline at end of file assert r["message"] == param["assert_message"]
else:
assert r["message"] == param["assert_message"]
print('接口出错了')
\ No newline at end of file
...@@ -7,14 +7,15 @@ index_v9: ...@@ -7,14 +7,15 @@ index_v9:
version: "7.42.2" version: "7.42.2"
assert: 0 assert: 0
- case: "推荐内容/接口请求成功,有数据返回" - case: "直播tab请求成功,有数据返回"
current_city_id: "beijing" current_city_id: "beijing"
tabtype: "home_video" tabtype: "home_video"
version: "7.42.2" version: "7.42.2"
assert: 0 assert: 0
- case: "直播tab接口请求成功,有数据返回" - case: "推荐内容/接口接口请求成功,有数据返回 "
current_city_id: "beijing" current_city_id: "beijing"
tabtype: "customize_commodity" tabtype: "customize_commodity"
version: "7.42.2" version: 7.47.1
assert: 0 assert: 0
\ No newline at end of file tab_id: 96
...@@ -6,7 +6,6 @@ tag_service: ...@@ -6,7 +6,6 @@ tag_service:
size: 10 size: 10
tag_ids: [] tag_ids: []
offset: 0 offset: 0
tag_id:
version: 7.43.0 version: 7.43.0
device_id: 869378034450718 device_id: 869378034450718
......
...@@ -2,15 +2,17 @@ add_live_service: ...@@ -2,15 +2,17 @@ add_live_service:
#主播-推荐袋添加商品-添加一个商品 #主播-推荐袋添加商品-添加一个商品
- -
case: "主播-推荐袋添加商品-添加一个商品" case: "主播-推荐袋添加商品-添加一个商品"
channel_id: "747" channel_id: ""#此字段取值直播开播接口的返参channel
service_item_ids: "560641" service_item_ids: "380519"
version: "7.45.0" version: "7.45.0"
assert : 成功添加1件商品 assert : 成功添加1件商品
assert_message: ""
#主播-推荐袋添加商品-添加多个商品 #主播-推荐袋添加商品-添加多个商品
- -
case: "主播-推荐袋添加商品-添加多个商品" case: "主播-推荐袋添加商品-添加多个商品"
channel_id: "747" channel_id: ""#此字段取值直播开播接口的返参channel
service_item_ids: "108278,578088,585823" service_item_ids: "108278,578088,585823"
version: "7.45.0" version: "7.45.0"
assert : 成功添加3件商品 assert : 成功添加3件商品
\ No newline at end of file assert_message: ""
\ No newline at end of file
...@@ -39,7 +39,7 @@ push_live_info: ...@@ -39,7 +39,7 @@ push_live_info:
cover_url: "2021/04/22/1003/cef471cff5e6" cover_url: "2021/04/22/1003/cef471cff5e6"
notice: "公告" notice: "公告"
tag_id: "1" tag_id: "1"
clarity: "2" clarity: "3"
device_type: "1" device_type: "1"
assert: 0 assert: 0
# assert_message1 : "请登录后再试" # assert_message1 : "请登录后再试"
......
...@@ -3,7 +3,7 @@ reply_create: ...@@ -3,7 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变' beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验 case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan channel: benzhan
content: ces测试+2021-08-13 15:36:32 content: ces测试+2021-08-16 17:42:16
message: 请勿回复重复内容 message: 请勿回复重复内容
message1: 回复成功 message1: 回复成功
message2: 你的回复有点频繁,稍后再来 message2: 你的回复有点频繁,稍后再来
......
...@@ -8,7 +8,9 @@ beautycard_skus: ...@@ -8,7 +8,9 @@ beautycard_skus:
sort_type: "0" sort_type: "0"
page: "0" page: "0"
page_size: "20" page_size: "20"
version: "747.0"
assert: 0 assert: 0
assert_message: ""
- -
#更美次卡商品列表组件商品-按SKU导入,商品默认排序 #更美次卡商品列表组件商品-按SKU导入,商品默认排序
...@@ -19,7 +21,9 @@ beautycard_skus: ...@@ -19,7 +21,9 @@ beautycard_skus:
sort_type: "0" sort_type: "0"
page: "0" page: "0"
page_size: "20" page_size: "20"
version: "747.0"
assert: 0 assert: 0
assert_message: ""
- -
#更美次卡商品列表组件商品-按SPU导入,商品价格最低 #更美次卡商品列表组件商品-按SPU导入,商品价格最低
...@@ -30,7 +34,9 @@ beautycard_skus: ...@@ -30,7 +34,9 @@ beautycard_skus:
sort_type: "2" sort_type: "2"
page: "0" page: "0"
page_size: "20" page_size: "20"
version: "747.0"
assert: 0 assert: 0
assert_message: ""
- -
#更美次卡商品列表组件商品-按SKU导入,商品价格最低 #更美次卡商品列表组件商品-按SKU导入,商品价格最低
...@@ -41,7 +47,9 @@ beautycard_skus: ...@@ -41,7 +47,9 @@ beautycard_skus:
sort_type: "2" sort_type: "2"
page: "0" page: "0"
page_size: "20" page_size: "20"
version: "747.0"
assert: 0 assert: 0
assert_message: ""
- -
#更美次卡商品列表组件商品-按SPU导入,商品销量最高 #更美次卡商品列表组件商品-按SPU导入,商品销量最高
...@@ -52,7 +60,9 @@ beautycard_skus: ...@@ -52,7 +60,9 @@ beautycard_skus:
sort_type: "1" sort_type: "1"
page: "0" page: "0"
page_size: "20" page_size: "20"
version: "747.0"
assert: 0 assert: 0
assert_message: ""
- -
#更美次卡商品列表组件商品-按SKU导入,商品销量最高 #更美次卡商品列表组件商品-按SKU导入,商品销量最高
...@@ -63,7 +73,9 @@ beautycard_skus: ...@@ -63,7 +73,9 @@ beautycard_skus:
sort_type: "1" sort_type: "1"
page: "0" page: "0"
page_size: "20" page_size: "20"
version: "747.0"
assert: 0 assert: 0
assert_message: ""
- -
#更美次卡商品列表组件商品-按SPU导入,商品最新上架 #更美次卡商品列表组件商品-按SPU导入,商品最新上架
...@@ -74,7 +86,9 @@ beautycard_skus: ...@@ -74,7 +86,9 @@ beautycard_skus:
sort_type: "3" sort_type: "3"
page: "0" page: "0"
page_size: "20" page_size: "20"
version: "747.0"
assert: 0 assert: 0
assert_message: ""
- -
#更美次卡商品列表组件商品-按SKU导入,商品最新上架 #更美次卡商品列表组件商品-按SKU导入,商品最新上架
...@@ -85,7 +99,9 @@ beautycard_skus: ...@@ -85,7 +99,9 @@ beautycard_skus:
sort_type: "3" sort_type: "3"
page: "0" page: "0"
page_size: "20" page_size: "20"
version: "747.0"
assert: 0 assert: 0
assert_message: ""
- -
#更美次卡商品列表组件商品-按SPU导入,修改城市筛选器为北京,商品正常召回 #更美次卡商品列表组件商品-按SPU导入,修改城市筛选器为北京,商品正常召回
...@@ -96,7 +112,9 @@ beautycard_skus: ...@@ -96,7 +112,9 @@ beautycard_skus:
sort_type: "2" sort_type: "2"
page: "0" page: "0"
page_size: "20" page_size: "20"
version: "747.0"
assert: 0 assert: 0
assert_message: ""
- -
#更美次卡商品列表组件商品-按SKU导入,修改城市筛选器为北京,商品正常召回 #更美次卡商品列表组件商品-按SKU导入,修改城市筛选器为北京,商品正常召回
...@@ -107,4 +125,6 @@ beautycard_skus: ...@@ -107,4 +125,6 @@ beautycard_skus:
sort_type: "1" sort_type: "1"
page: "0" page: "0"
page_size: "20" page_size: "20"
version: "747.0"
assert: 0 assert: 0
assert_message: ""
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