Commit 5d49fe8f authored by aha's avatar aha

直播回放-查看直播间弹幕

parent 2248fd83
......@@ -52,6 +52,12 @@ class living_request(BaseRequest):
self.params["version"] = version
return self.api_send(self.data["replay_info"])
#直播回放-查看直播间弹幕
def replay_msg(self,topic_id, version, device_id="97B6764B-2135-4761-9911-701C38CBC272"):
self.params["topic_id"] = topic_id
self.params["version"] = version
return self.api_send(self.data["replay_msg"])
#主播-分享按钮的点击
def get_live_info_audience(self,channel_id, version, device_id="97B6764B-2135-4761-9911-701C38CBC272"):
self.params["channel_id"] = channel_id
......@@ -67,4 +73,5 @@ if __name__ == '__main__':
# print (living_request().sendmsg("739","你好"))
# print(living_request().finish("745", "746.0"))
# print(living_request().get_live_info_audience("745", "7.46.0"))
print(living_request().replay_info("123456978", "746.0"))
\ No newline at end of file
# print(living_request().replay_info("123456978", "746.0"))
print(living_request().replay_msg("123456978", "746.0"))
\ No newline at end of file
......@@ -80,6 +80,17 @@ replay_info:
json: {}
isLogin: 1
#直播回放-查看直播间弹幕
replay_msg:
method: GET
url: /api/live/replay_msg
params:
topic_id: ${topic_id}
version: ${version}
data: {}
json: {}
isLogin: 1
#主播-分享按钮的点击
get_live_info_audience:
method: GET
......
......@@ -659,6 +659,10 @@ FINISH = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "fin
REPLAY_INFO_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "live_request.yaml")
REPLAY_INFO = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "replay_info.yaml")
#直播回放-查看直播间弹幕
REPLAY_MSG_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "live_request.yaml")
REPLAY_MSG = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "replay_msg.yaml")
#主播标记讲解商品+取消标记
MARK_LIVE_SERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
MARK_LIVE_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "mark_live_service.yaml")
......
......@@ -12,6 +12,6 @@ class TestReplayInfo:
@pytest.mark.parametrize("param", replay_info_data, ids=replay_info_case)
def test_replay_info(self, param):
r = living_request().replay_info(param["topic_id"], param["version"])
print("看看直播回放咯")
if r["error"] == 0:
assert r["data"]["topic_id"] == param["assert"]
\ No newline at end of file
assert r["data"]["topic_id"] == param["assert"]
print("看看直播回放咯")
\ 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.live_request import living_request
class TestReplayMsg:
data = BaseRequest().api_load(path_setting.REPLAY_MSG)
replay_msg_case, replay_msg_data = get_ids(data,"replay_msg")
@pytest.mark.parametrize("param", replay_msg_data, ids=replay_msg_case)
def test_replay_msg(self, param):
r = living_request().replay_msg(param["topic_id"], param["version"])
if r["error"] == 0:
assert r["data"]["245"][0]["type"] == param["assert"]
print("看看直播回放的弹幕~")
\ No newline at end of file
replay_msg:
#看看直播回放的弹幕~
-
case: "看看直播回放的弹幕~"
topic_id: "123456978"
version: "7.45.0"
assert: 2
\ 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