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
d8ae1de7
Commit
d8ae1de7
authored
Jul 21, 2021
by
edz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播-主播获取美颜/更改美颜
parent
243d8efc
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
114 additions
and
5 deletions
+114
-5
janus_request.py
all_backend_api/janus_request.py
+28
-3
janus_request.yaml
all_backend_api/janus_request.yaml
+25
-0
path_setting.py
path_setting.py
+5
-0
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
beauty.yaml
test_backend_data/janus_data/beauty.yaml
+6
-0
beauty_post.yaml
test_backend_data/janus_data/beauty_post.yaml
+18
-0
topic_reply_create.yaml
test_backend_data/topic_data/topic_reply_create.yaml
+3
-2
No files found.
all_backend_api/janus_request.py
View file @
d8ae1de7
...
...
@@ -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
):
#搜索词
...
...
@@ -240,11 +246,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信息接口返回
...
...
@@ -253,11 +272,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"
)
#打印次卡-确认订单接口返回
...
...
@@ -317,4 +336,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 @
d8ae1de7
...
...
@@ -324,3 +324,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
path_setting.py
View file @
d8ae1de7
...
...
@@ -543,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"
)
...
...
test_backend_case/janus_case/test_beauty.py
0 → 100644
View file @
d8ae1de7
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 @
d8ae1de7
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_data/janus_data/beauty.yaml
0 → 100644
View file @
d8ae1de7
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 @
d8ae1de7
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/topic_data/topic_reply_create.yaml
View file @
d8ae1de7
...
...
@@ -3,7 +3,7 @@ reply_create:
beuzhu
:
'
#
备注:
这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case
:
日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel
:
benzhan
content
:
ces测试+2021-07-16 1
0:43:52
content
:
ces测试+2021-07-16 1
1:13:46
message
:
请勿回复重复内容
message1
:
回复成功
message2
:
你的回复有点频繁,稍后再来
...
...
@@ -15,4 +15,4 @@ reply_create:
message
:
请勿回复重复内容
message1
:
回复成功
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