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
68c06066
Commit
68c06066
authored
Jul 22, 2021
by
aha
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cuixin_dev' into common_dev
parents
f5462cba
c89c5b57
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
2 deletions
+54
-2
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_get_live_info_audience.py
test_backend_case/live_case/test_get_live_info_audience.py
+21
-0
get_live_info_audience.yaml
test_backend_data/live_data/get_live_info_audience.yaml
+9
-0
No files found.
all_backend_api/live_request.py
View file @
68c06066
...
...
@@ -46,6 +46,12 @@ class living_request(BaseRequest):
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"finish"
])
#主播-分享按钮的点击
def
get_live_info_audience
(
self
,
channel_id
,
version
,
device_id
=
"97B6764B-2135-4761-9911-701C38CBC272"
):
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"get_live_info_audience"
])
...
...
@@ -53,4 +59,5 @@ if __name__ == '__main__':
(
living_request
()
.
danmu_v2
(
"739"
,
"1"
))
(
living_request
()
.
pushlive_info
(
"小冤家"
,
"2021/04/22/1003/cef471cff5e6"
,
""
,
"1"
,
"1"
,
"1"
))
print
(
living_request
()
.
sendmsg
(
"739"
,
"你好"
))
print
(
living_request
()
.
finish
(
"745"
,
"746.0"
))
\ No newline at end of file
print
(
living_request
()
.
finish
(
"745"
,
"746.0"
))
print
(
living_request
()
.
get_live_info_audience
(
"745"
,
"7.46.0"
))
\ No newline at end of file
all_backend_api/live_request.yaml
View file @
68c06066
...
...
@@ -68,3 +68,14 @@ finish:
channel_id
:
${channel_id}
json
:
{}
isLogin
:
1
#主播-分享按钮的点击
get_live_info_audience
:
method
:
GET
url
:
/api/live/get_live_info/audience
params
:
channel_id
:
${channel_id}
version
:
${version}
data
:
{}
json
:
{}
isLogin
:
1
path_setting.py
View file @
68c06066
...
...
@@ -601,6 +601,10 @@ FINISH = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "fin
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"
)
#主播-分享按钮的点击
GET_LIVE_INFO_AUDIENCE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"live_request.yaml"
)
GET_LIVE_INFO_AUDIENCE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"get_live_info_audience.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/live_case/test_get_live_info_audience.py
0 → 100644
View file @
68c06066
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
TestGetLiveInfoAudience
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
GET_LIVE_INFO_AUDIENCE
)
get_live_info_audience_case
,
get_live_info_audience_data
=
get_ids
(
data
,
"get_live_info_audience"
)
@pytest.mark.parametrize
(
"param"
,
get_live_info_audience_data
,
ids
=
get_live_info_audience_case
)
def
test_get_live_info_audience
(
self
,
param
):
r
=
living_request
()
.
get_live_info_audience
(
param
[
"channel_id"
],
param
[
"version"
])
print
(
"主播分享直播间"
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"channel_id"
]
==
param
[
"assert"
]
assert
r
[
"data"
][
"share_data"
][
"wechat"
][
"title"
][
0
:
7
]
==
param
[
"assert0"
]
assert
r
[
"data"
][
"share_data"
][
"wechatline"
][
"title"
][
0
:
7
]
==
param
[
"assert0"
]
assert
r
[
"data"
][
"share_data"
][
"qq"
][
"title"
][
0
:
7
]
==
param
[
"assert0"
]
\ No newline at end of file
test_backend_data/live_data/get_live_info_audience.yaml
0 → 100644
View file @
68c06066
get_live_info_audience
:
#主播分享直播间
-
case
:
"
主播分享直播间"
channel_id
:
"
745"
version
:
"
7.45.0"
assert
:
745
assert0
:
更美APP直播
\ 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