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
9f3c84ca
Commit
9f3c84ca
authored
Jul 23, 2021
by
张伟男
Browse files
Options
Browse Files
Download
Plain Diff
merge common_dev
parents
c95b57d7
370b4129
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
392 additions
and
11 deletions
+392
-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
janus_request.py
all_backend_api/janus_request.py
+28
-3
janus_request.yaml
all_backend_api/janus_request.yaml
+25
-0
live_request.py
all_backend_api/live_request.py
+25
-3
live_request.yaml
all_backend_api/live_request.yaml
+33
-2
tag_request.py
all_backend_api/tag_request.py
+14
-0
tag_request.yaml
all_backend_api/tag_request.yaml
+10
-0
path_setting.py
path_setting.py
+23
-1
test_beauty.py
test_backend_case/janus_case/test_beauty.py
+15
-0
test_beauty_post.py
test_backend_case/janus_case/test_beauty_post.py
+14
-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
test_sendmsg.py
test_backend_case/live_case/test_sendmsg.py
+22
-0
__init__.py
test_backend_case/tag_case/__init__.py
+0
-0
test_tag_add.py
test_backend_case/tag_case/test_tag_add.py
+15
-0
beauty.yaml
test_backend_data/janus_data/beauty.yaml
+6
-0
beauty_post.yaml
test_backend_data/janus_data/beauty_post.yaml
+18
-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
sendmsg.yaml
test_backend_data/live_data/sendmsg.yaml
+15
-0
__init__.py
test_backend_data/tag_data/__init__.py
+0
-0
tag_add.yaml
test_backend_data/tag_data/tag_add.yaml
+6
-0
topic_reply_create.yaml
test_backend_data/topic_data/topic_reply_create.yaml
+1
-0
No files found.
all_backend_api/janus_live_request.py
View file @
9f3c84ca
...
...
@@ -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 @
9f3c84ca
...
...
@@ -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
all_backend_api/janus_request.py
View file @
9f3c84ca
...
...
@@ -25,6 +25,12 @@ class janus_request(BaseRequest):
#直播polling循环
self
.
data
=
self
.
api_load
(
path_setting
.
POLLING_CONFIG
)
#直播获取美颜
#self.data = self.api_load(path_setting.BEAUTY_CONFIG)
#搜索结果页-综合/百科tab
def
content_v7
(
self
,
query
,
device_id
,
current_city_id
,
version
,
is_first
,
tab_type
,
offset
):
#搜索词
...
...
@@ -235,11 +241,24 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"polling"
])
#直播-主播获取美颜效果
def
beauty
(
self
,
channel_id
):
self
.
params
[
"channel_id"
]
=
channel_id
return
self
.
api_send
(
self
.
data
[
"beauty"
])
#直播-主播修改美颜效果
def
beauty_post
(
self
,
channel_id
,
is_open
,
smooth
,
white
,
rosy
):
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"is_open"
]
=
is_open
self
.
params
[
"smooth"
]
=
smooth
self
.
params
[
"white"
]
=
white
self
.
params
[
"rosy"
]
=
rosy
return
self
.
api_send
(
self
.
data
[
"beauty_post"
])
if
__name__
==
'__main__'
:
#打印购物车-猜你喜欢列表接口返回
print
(
janus_request
()
.
mine_guess_you_like
())
#
print(janus_request().mine_guess_you_like())
#打印商祥页-详情接口返回
print
(
janus_request
()
.
product_detail
(
"5857263"
,
"618788"
,
"7.43.0"
))
#打印商祥页-sku信息接口返回
...
...
@@ -248,11 +267,11 @@ if __name__ == '__main__':
print
(
janus_request
()
.
product_coupon_my_list
(
0
,
0
))
#品类聚合页面商品列表接口返回
print
(
janus_request
()
.
tag_service
())
#
print(janus_request().tag_service())
print
(
"fgx"
)
#品类聚合页面标签和专场
print
(
janus_request
()
.
polymer
())
#
print(janus_request().polymer())
print
(
"fgx"
)
#打印次卡-确认订单接口返回
...
...
@@ -312,4 +331,10 @@ if __name__ == '__main__':
#直播-点击【设置封面】
print
(
"直播-点击【设置封面】"
)
print
(
janus_request
()
.
page_rules
(
"744.2"
,
"beijing"
,
"post_add_pic"
))
#直播-主播获取美颜
print
(
"meiyan"
)
print
(
janus_request
()
.
beauty
(
"739"
))
#直播-主播修改美颜
print
(
"change meiyan"
)
print
(
janus_request
()
.
beauty_post
(
"739"
,
"true"
,
"0.60"
,
"0.40"
,
"0.70"
))
all_backend_api/janus_request.yaml
View file @
9f3c84ca
...
...
@@ -320,3 +320,27 @@ polling:
data
:
{}
json
:
{}
#直播-主播获取美颜
beauty
:
method
:
get
url
:
/api/janus/live/beauty
params
:
channel_id
:
${channel_id}
data
:
{}
json
:
{}
isLogin
:
1
#直播-主播修改美颜
beauty_post
:
method
:
post
url
:
/api/janus/live/beauty
params
:
{}
data
:
channel_id
:
${channel_id}
is_open
:
${is_open}
smooth
:
${smooth}
white
:
${white}
rosy
:
${rosy}
json
:
{}
isLogin
:
1
\ No newline at end of file
all_backend_api/live_request.py
View file @
9f3c84ca
...
...
@@ -11,7 +11,7 @@ class living_request(BaseRequest):
self
.
params
[
"msg_id"
]
=
msg_id
self
.
params
[
"user_id"
]
=
user_id
return
self
.
api_send
(
self
.
data
[
"danmu_v2"
])
#主播开播
#主播开播
git
def
pushlive_info
(
self
,
title
,
cover_url
,
notice
,
tag_id
,
clarity
,
device_type
):
self
.
params
[
"title"
]
=
title
self
.
params
[
"cover_url"
]
=
cover_url
...
...
@@ -20,6 +20,12 @@ class living_request(BaseRequest):
self
.
params
[
"clarity"
]
=
clarity
self
.
params
[
"device_type"
]
=
device_type
return
self
.
api_send
(
self
.
data
[
"pushlive_info"
])
#用户-发送弹幕
def
sendmsg
(
self
,
channel_id
,
msg
):
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"msg"
]
=
msg
return
self
.
api_send
(
self
.
data
[
'sendmsg'
])
#观众进入直播间
def
enter
(
self
,
channel_id
,
from_source
,
version
,
device_id
=
"97B6764B-2135-4761-9911-701C38CBC272"
):
...
...
@@ -34,8 +40,24 @@ class living_request(BaseRequest):
self
.
params
[
"version"
]
=
version
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__'
:
(
living_request
()
.
danmu_v2
(
"739"
,
"1"
))
(
living_request
()
.
pushlive_info
(
"小冤家"
,
"2021/04/22/1003/cef471cff5e6"
,
""
,
"1"
,
"1"
,
"1"
))
\ No newline at end of file
(
living_request
()
.
pushlive_info
(
"小冤家"
,
"2021/04/22/1003/cef471cff5e6"
,
""
,
"1"
,
"1"
,
"1"
))
print
(
living_request
()
.
sendmsg
(
"739"
,
"你好"
))
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 @
9f3c84ca
...
...
@@ -26,7 +26,7 @@ pushlive_info:
#观众进入直播间
enter
:
method
:
get
method
:
GET
url
:
/api/live/enter
params
:
channel_id
:
${channel_id}
...
...
@@ -38,7 +38,7 @@ enter:
#观众离开直播间
leave
:
method
:
get
method
:
GET
url
:
/api/live/leave
params
:
channel_id
:
${channel_id}
...
...
@@ -47,4 +47,35 @@ leave:
json
:
{}
isLogin
:
1
#用户-发送弹幕
sendmsg
:
method
:
POST
url
:
/api/live/sendmsg
params
:
{}
data
:
channel_id
:
${channel_id}
msg
:
${msg}
json
:
{}
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
all_backend_api/tag_request.py
0 → 100644
View file @
9f3c84ca
import
path_setting
from
in_common.base_request
import
BaseRequest
class
tag_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
TAG_CONFIG
)
#直播开播新加标签
def
tag_add
(
self
,
name
):
self
.
params
[
"name"
]
=
name
return
self
.
api_send
(
self
.
data
[
"tag_add"
])
if
__name__
==
'__main__'
:
print
(
tag_request
()
.
tag_add
(
"你好"
))
\ No newline at end of file
all_backend_api/tag_request.yaml
0 → 100644
View file @
9f3c84ca
#新增标签
tag_add
:
method
:
post
url
:
/api/tag/add
params
:
{}
data
:
name
:
${name}
json
:
{}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
9f3c84ca
...
...
@@ -308,7 +308,8 @@ LIVEYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "live_r
DANMU_V2
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"danmu_v2.yaml"
)
#直播-主播开播
PUSH_LIVE_INFO
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"pushlive_info.yaml"
)
#直播-发送弹幕
SENDMSG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"sendmsg.yaml"
)
#商祥页-详情
...
...
@@ -542,6 +543,11 @@ PAGE_RULES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data",
POLLING_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
POLLING
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"polling.yaml"
)
#主播-获取美颜效果
#BEAUTY_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
BEAUTY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty.yaml"
)
BEAUTY_POST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_post.yaml"
)
#直播关注/取关主播
FOLLOW_ADD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"follow_add.yaml"
)
FOLLOW_DEL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"follow_del.yaml"
)
...
...
@@ -587,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
=
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
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"free_recruit_detail.yaml"
)
...
...
@@ -619,5 +637,9 @@ FAVORS_SERVICES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_da
#我的-帖子-我回复的
REPLY_TRACTATE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
REPLY_TRACTATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"reply_tractate.yaml"
)
#直播-新增标签
TAG_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"tag_request.yaml"
)
TAG_ADD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tag_data"
,
"tag_add.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/janus_case/test_beauty.py
0 → 100644
View file @
9f3c84ca
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.janus_request
import
janus_request
class
TestBeauty
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
BEAUTY
)
beauty_case
,
beauty_data
=
get_ids
(
data
,
"beauty"
)
@pytest.mark.parametrize
(
"param"
,
beauty_data
,
ids
=
beauty_case
)
def
test_beauty
(
self
,
param
):
print
(
"******************"
)
r
=
janus_request
()
.
beauty
(
param
[
"channel_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/janus_case/test_beauty_post.py
0 → 100644
View file @
9f3c84ca
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.janus_request
import
janus_request
class
TestBeautyPost
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
BEAUTY_POST
)
beauty_post_case
,
beauty_post_data
=
get_ids
(
data
,
"beauty_post"
)
@pytest.mark.parametrize
(
"param"
,
beauty_post_data
,
ids
=
beauty_post_case
)
def
test_beauty_post
(
self
,
param
):
r
=
janus_request
()
.
beauty_post
(
param
[
"channel_id"
],
param
[
"is_open"
],
param
[
"smooth"
],
param
[
"white"
],
param
[
"rosy"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/janus_live_case/test_mark_live_service.py
0 → 100644
View file @
9f3c84ca
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 @
9f3c84ca
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 @
9f3c84ca
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_case/live_case/test_sendmsg.py
0 → 100644
View file @
9f3c84ca
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
#@pytest.fixture(scope='function')
#def create_live():
# pass
class
TestSendmsg
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SENDMSG
)
sendmsg_case
,
sendmsg_data
=
get_ids
(
data
,
"sendmsg"
)
@pytest.mark.parametrize
(
"param"
,
sendmsg_data
,
ids
=
sendmsg_case
)
def
test_sendmsg
(
self
,
param
):
r
=
living_request
()
.
sendmsg
(
param
[
"channel_id"
],
param
[
"msg"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_case/tag_case/__init__.py
0 → 100644
View file @
9f3c84ca
test_backend_case/tag_case/test_tag_add.py
0 → 100644
View file @
9f3c84ca
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.tag_request
import
tag_request
class
TestTagAdd
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TAG_ADD
)
tag_add_case
,
tag_add_data
=
get_ids
(
data
,
"tag_add"
)
@pytest.mark.parametrize
(
"param"
,
tag_add_data
,
ids
=
tag_add_case
)
def
test_tag_add
(
self
,
param
):
r
=
tag_request
()
.
tag_add
(
param
[
"name"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_data/janus_data/beauty.yaml
0 → 100644
View file @
9f3c84ca
beauty
:
-
case
:
"
主播获取美颜效果"
channel_id
:
"
739"
assert
:
0
\ No newline at end of file
test_backend_data/janus_data/beauty_post.yaml
0 → 100644
View file @
9f3c84ca
beauty_post
:
-
case
:
"
主播更改美颜效果"
channel_id
:
"
739"
is_open
:
"
true"
smooth
:
"
0.60"
white
:
"
0.40"
rosy
:
"
0.70"
assert
:
0
-
case
:
"
主播关闭美颜"
channel_id
:
"
739"
is_open
:
"
false"
smooth
:
"
0"
white
:
"
0"
rosy
:
"
0"
assert
:
0
\ No newline at end of file
test_backend_data/janus_live_data/mark_live_service.yaml
0 → 100644
View file @
9f3c84ca
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 @
9f3c84ca
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 @
9f3c84ca
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/live_data/sendmsg.yaml
0 → 100644
View file @
9f3c84ca
sendmsg
:
#发送弹幕
-
case
:
"
发送弹幕"
channel_id
:
"
726"
msg
:
"
主播可真美"
assert
:
0
#弹幕内容包含敏感信息,发送失败
-
case
:
"
弹幕内容包含敏感信息,发送失败"
channel_id
:
"
784"
msg
:
"
黄色图片"
assert
:
您输入的内容包含敏感信息,请重新输入
\ No newline at end of file
test_backend_data/tag_data/__init__.py
0 → 100644
View file @
9f3c84ca
test_backend_data/tag_data/tag_add.yaml
0 → 100644
View file @
9f3c84ca
tag_add
:
-
case
:
"
直播-新增标签"
name
:
"
小冤家专属标签"
assert
:
0
\ No newline at end of file
test_backend_data/topic_data/topic_reply_create.yaml
View file @
9f3c84ca
...
...
@@ -4,6 +4,7 @@ reply_create:
case
:
日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel
:
benzhan
content
:
ces测试+2021-07-16 16:30:24
content
:
ces测试+2021-07-22 18:42:59
message
:
请勿回复重复内容
message1
:
回复成功
message2
:
你的回复有点频繁,稍后再来
...
...
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