Commit 81f1909f authored by aha's avatar aha

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

parent a212a564
...@@ -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
...@@ -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
...@@ -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
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