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
81f1909f
Commit
81f1909f
authored
Aug 16, 2021
by
aha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 主播-推荐袋添加商品:/api/janus/live/add_live_service
parent
a212a564
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
live_request.py
all_backend_api/live_request.py
+3
-3
test_add_live_service.py
test_backend_case/janus_live_case/test_add_live_service.py
+10
-0
add_live_service.yaml
test_backend_data/janus_live_data/add_live_service.yaml
+6
-3
No files found.
all_backend_api/live_request.py
View file @
81f1909f
...
@@ -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
test_backend_case/janus_live_case/test_add_live_service.py
View file @
81f1909f
...
@@ -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
test_backend_data/janus_live_data/add_live_service.yaml
View file @
81f1909f
...
@@ -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
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