Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
backend_auto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邓莹莹
backend_auto
Commits
5d49fe8f
Commit
5d49fe8f
authored
Aug 03, 2021
by
aha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播回放-查看直播间弹幕
parent
2248fd83
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
5 deletions
+53
-5
live_request.py
all_backend_api/live_request.py
+9
-2
live_request.yaml
all_backend_api/live_request.yaml
+11
-0
path_setting.py
path_setting.py
+4
-0
test_replay_info.py
test_backend_case/live_case/test_replay_info.py
+3
-3
test_replay_msg.py
test_backend_case/live_case/test_replay_msg.py
+18
-0
replay_msg.yaml
test_backend_data/live_data/replay_msg.yaml
+8
-0
No files found.
all_backend_api/live_request.py
View file @
5d49fe8f
...
...
@@ -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
all_backend_api/live_request.yaml
View file @
5d49fe8f
...
...
@@ -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
...
...
path_setting.py
View file @
5d49fe8f
...
...
@@ -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"
)
...
...
test_backend_case/live_case/test_replay_info.py
View file @
5d49fe8f
...
...
@@ -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
test_backend_case/live_case/test_replay_msg.py
0 → 100644
View file @
5d49fe8f
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
test_backend_data/live_data/replay_msg.yaml
0 → 100644
View file @
5d49fe8f
replay_msg
:
#看看直播回放的弹幕~
-
case
:
"
看看直播回放的弹幕~"
topic_id
:
"
123456978"
version
:
"
7.45.0"
assert
:
2
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment