Commit f30223f1 authored by aha's avatar aha

fix 主播-推荐袋添加商品:/api/janus/live/add_live_service …

fix 主播-推荐袋添加商品:/api/janus/live/add_live_service      次卡商品列表组件商品:/api/janus/visual_beauty_card/list_unit/skus
parents 9f9a6ddd 4cdba2db
...@@ -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
...@@ -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: {}
...@@ -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"]
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"]
assert r["message"] == param["assert_message"]
else:
assert r["message"] == param["assert_message"]
print('接口出错了')
\ No newline at end of file
...@@ -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件商品
assert_message: ""
\ No newline at end of file
...@@ -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 16:49:17 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