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
370b4129
Commit
370b4129
authored
Jul 23, 2021
by
edz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' into crk_dev
parents
e90b6fd2
db969359
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
178 additions
and
11 deletions
+178
-11
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
live_request.py
all_backend_api/live_request.py
+18
-4
live_request.yaml
all_backend_api/live_request.yaml
+24
-2
path_setting.py
path_setting.py
+12
-0
test_mark_live_service.py
test_backend_case/janus_live_case/test_mark_live_service.py
+19
-0
test_finish.py
test_backend_case/live_case/test_finish.py
+18
-0
test_get_live_info_audience.py
test_backend_case/live_case/test_get_live_info_audience.py
+21
-0
mark_live_service.yaml
test_backend_data/janus_live_data/mark_live_service.yaml
+20
-0
finish.yaml
test_backend_data/live_data/finish.yaml
+8
-0
get_live_info_audience.yaml
test_backend_data/live_data/get_live_info_audience.yaml
+9
-0
topic_reply_create.yaml
test_backend_data/topic_data/topic_reply_create.yaml
+2
-3
No files found.
all_backend_api/janus_live_request.py
View file @
370b4129
...
@@ -11,6 +11,7 @@ class live_request(BaseRequest):
...
@@ -11,6 +11,7 @@ class live_request(BaseRequest):
self
.
data
=
self
.
api_load
(
path_setting
.
DELETELIVESERVICE_CONFIG
)
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
.
DELETEGIFT_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
M_GET_CHANNEL_STATUS_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
):
def
live_services
(
self
,
channel_id
,
stream_id
,
offset
,
size
):
...
@@ -80,9 +81,19 @@ class live_request(BaseRequest):
...
@@ -80,9 +81,19 @@ class live_request(BaseRequest):
self
.
params
[
"version"
]
=
version
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"m_get_channel_status"
])
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__'
:
if
__name__
==
'__main__'
:
# print(live_request().live_services("745", "4177", "0", "10"))
# print(live_request().live_services("745", "4177", "0", "10"))
# print(live_request().search_service("beijing", "745", "", "0", "20", "7.45.0"))
# 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().add_live_service("745", "560641", "7.45.0"))
# print(live_request().delete_live_service("745", "7242", "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"
))
#print(live_request().m_get_channel_status("745", "7.46.0"))
\ No newline at end of file
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 @
370b4129
...
@@ -89,4 +89,18 @@ m_get_channel_status:
...
@@ -89,4 +89,18 @@ m_get_channel_status:
json
:
{}
json
:
{}
isLogin
:
1
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
all_backend_api/live_request.py
View file @
370b4129
...
@@ -40,10 +40,24 @@ class living_request(BaseRequest):
...
@@ -40,10 +40,24 @@ class living_request(BaseRequest):
self
.
params
[
"version"
]
=
version
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"leave"
])
return
self
.
api_send
(
self
.
data
[
"leave"
])
#直播结束-主播下播
def
finish
(
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
[
"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"
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# print (living_request().danmu_v2("739", "1"))
(
living_request
()
.
danmu_v2
(
"739"
,
"1"
))
# print (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"
,
"你好"
))
\ 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 @
370b4129
...
@@ -26,7 +26,7 @@ pushlive_info:
...
@@ -26,7 +26,7 @@ pushlive_info:
#观众进入直播间
#观众进入直播间
enter
:
enter
:
method
:
get
method
:
GET
url
:
/api/live/enter
url
:
/api/live/enter
params
:
params
:
channel_id
:
${channel_id}
channel_id
:
${channel_id}
...
@@ -38,7 +38,7 @@ enter:
...
@@ -38,7 +38,7 @@ enter:
#观众离开直播间
#观众离开直播间
leave
:
leave
:
method
:
get
method
:
GET
url
:
/api/live/leave
url
:
/api/live/leave
params
:
params
:
channel_id
:
${channel_id}
channel_id
:
${channel_id}
...
@@ -57,3 +57,25 @@ sendmsg:
...
@@ -57,3 +57,25 @@ sendmsg:
msg
:
${msg}
msg
:
${msg}
json
:
{}
json
:
{}
isLogin
:
1
isLogin
:
1
#直播结束-主播下播
finish
:
method
:
POST
url
:
/api/live/finish
params
:
version
:
${version}
data
:
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 @
370b4129
...
@@ -593,6 +593,18 @@ ENTER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "ente
...
@@ -593,6 +593,18 @@ 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_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"
)
LEAVE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"leave.yaml"
)
#直播结束-主播下播
FINISH_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"live_request.yaml"
)
FINISH
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"finish.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"
)
#主播-分享按钮的点击
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_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"
)
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 @
370b4129
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_case/live_case/test_finish.py
0 → 100644
View file @
370b4129
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
TestFinish
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FINISH
)
finish_case
,
finish_data
=
get_ids
(
data
,
"finish"
)
@pytest.mark.parametrize
(
"param"
,
finish_data
,
ids
=
finish_case
)
def
test_finish
(
self
,
param
):
r
=
living_request
()
.
finish
(
param
[
"channel_id"
],
param
[
"version"
])
print
(
"主播下播了,呜呜呜"
)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_case/live_case/test_get_live_info_audience.py
0 → 100644
View file @
370b4129
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/janus_live_data/mark_live_service.yaml
0 → 100644
View file @
370b4129
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
:
操作成功
test_backend_data/live_data/finish.yaml
0 → 100644
View file @
370b4129
finish
:
#主播下播了,呜呜呜
-
case
:
"
主播下播了,呜呜呜"
channel_id
:
"
745"
version
:
"
7.45.0"
assert
:
0
\ No newline at end of file
test_backend_data/live_data/get_live_info_audience.yaml
0 → 100644
View file @
370b4129
get_live_info_audience
:
#主播分享直播间
-
case
:
"
主播分享直播间"
channel_id
:
"
745"
version
:
"
7.45.0"
assert
:
745
assert0
:
更美APP直播
\ No newline at end of file
test_backend_data/topic_data/topic_reply_create.yaml
View file @
370b4129
...
@@ -3,7 +3,7 @@ reply_create:
...
@@ -3,7 +3,7 @@ reply_create:
beuzhu
:
'
#
备注:
这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
beuzhu
:
'
#
备注:
这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case
:
日记贴一级评论创建--正常校验&创建二级评论--正常校验
case
:
日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel
:
benzhan
channel
:
benzhan
content
:
ces测试+2021-07-
16 11:13:46
content
:
ces测试+2021-07-
22 18:42:59
message
:
请勿回复重复内容
message
:
请勿回复重复内容
message1
:
回复成功
message1
:
回复成功
message2
:
你的回复有点频繁,稍后再来
message2
:
你的回复有点频繁,稍后再来
...
@@ -15,4 +15,4 @@ reply_create:
...
@@ -15,4 +15,4 @@ reply_create:
message
:
请勿回复重复内容
message
:
请勿回复重复内容
message1
:
回复成功
message1
:
回复成功
message2
:
你的回复有点频繁,稍后再来
message2
:
你的回复有点频繁,稍后再来
replied_id
:
35526987
replied_id
:
35526987
\ 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