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
6292c508
Commit
6292c508
authored
Jul 20, 2021
by
aha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
主播标记商品/取消标记
parent
9cc43660
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
2 deletions
+70
-2
janus_live_request.py
all_backend_api/janus_live_request.py
+13
-2
janus_live_request.yaml
all_backend_api/janus_live_request.yaml
+14
-0
path_setting.py
path_setting.py
+4
-0
test_mark_live_service.py
test_backend_case/janus_live_case/test_mark_live_service.py
+19
-0
mark_live_service.yaml
test_backend_data/janus_live_data/mark_live_service.yaml
+20
-0
No files found.
all_backend_api/janus_live_request.py
View file @
6292c508
...
...
@@ -11,6 +11,7 @@ class live_request(BaseRequest):
self
.
data
=
self
.
api_load
(
path_setting
.
DELETELIVESERVICE_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
DELETEGIFT_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
M_GET_CHANNEL_STATUS_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
MARK_LIVE_SERVICE_CONFIG
)
#主播-推荐袋美购列表展示
def
live_services
(
self
,
channel_id
,
stream_id
,
offset
,
size
):
...
...
@@ -80,9 +81,19 @@ class live_request(BaseRequest):
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"m_get_channel_status"
])
#主播标记讲解商品+取消标记
def
mark_live_service
(
self
,
stream_id
,
channel_id
,
live_service_id
,
mark_status
,
version
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
self
.
params
[
"stream_id"
]
=
stream_id
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"live_service_id"
]
=
live_service_id
self
.
params
[
"mark_status"
]
=
mark_status
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"mark_live_service"
])
if
__name__
==
'__main__'
:
# print(live_request().live_services("745", "4177", "0", "10"))
# print(live_request().search_service("beijing", "745", "", "0", "20", "7.45.0"))
# print(live_request().add_live_service("745", "560641", "7.45.0"))
# print(live_request().delete_live_service("745", "7242", "7.45.0"))
print
(
live_request
()
.
m_get_channel_status
(
"745"
,
"7.46.0"
))
\ No newline at end of file
#print(live_request().m_get_channel_status("745", "7.46.0"))
print
(
live_request
()
.
mark_live_service
(
"4233"
,
"745"
,
"7269"
,
"1"
,
"746.0"
))
\ No newline at end of file
all_backend_api/janus_live_request.yaml
View file @
6292c508
...
...
@@ -89,4 +89,18 @@ m_get_channel_status:
json
:
{}
isLogin
:
1
#主播标记讲解商品+取消标记
mark_live_service
:
method
:
POST
url
:
/api/janus/live/mark_live_service
params
:
version
:
${version}
data
:
stream_id
:
${stream_id}
channel_id
:
${channel_id}
live_service_id
:
${live_service_id}
mark_status
:
${mark_status}
json
:
{}
isLogin
:
1
path_setting.py
View file @
6292c508
...
...
@@ -587,6 +587,10 @@ ENTER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "ente
LEAVE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"live_request.yaml"
)
LEAVE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"leave.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"
)
#免费招募活动详情
FREE_RECRUIT_DETAIL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
FREE_RECRUIT_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"free_recruit_detail.yaml"
)
...
...
test_backend_case/janus_live_case/test_mark_live_service.py
0 → 100644
View file @
6292c508
import
pytest
import
path_setting
from
all_backend_api.janus_live_request
import
live_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestMarkLiveService
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
MARK_LIVE_SERVICE
)
mark_live_service_case
,
mark_live_service_data
=
get_ids
(
data
,
"mark_live_service"
)
@pytest.mark.parametrize
(
"param"
,
mark_live_service_data
,
ids
=
mark_live_service_case
)
def
test_mark_live_service
(
self
,
param
):
print
(
111111111111111111111
)
r
=
live_request
()
.
mark_live_service
(
param
[
"stream_id"
],
param
[
"channel_id"
],
param
[
"live_service_id"
],
param
[
"mark_status"
],
param
[
"version"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"toast"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_data/janus_live_data/mark_live_service.yaml
0 → 100644
View file @
6292c508
mark_live_service
:
#主播-主播标记讲解商品
-
case
:
"
主播-主播标记讲解商品"
stream_id
:
"
4233"
channel_id
:
"
745"
live_service_id
:
"
7269"
mark_status
:
"
1"
version
:
"
7.45.0"
assert
:
操作成功
#主播-主播取消标记讲解商品
-
case
:
"
主播-主播取消标记讲解商品"
stream_id
:
"
4233"
channel_id
:
"
745"
live_service_id
:
"
7269"
mark_status
:
"
0"
version
:
"
7.45.0"
assert
:
操作成功
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