Commit d8ae1de7 authored by edz's avatar edz

直播-主播获取美颜/更改美颜

parent 243d8efc
...@@ -25,6 +25,12 @@ class janus_request(BaseRequest): ...@@ -25,6 +25,12 @@ class janus_request(BaseRequest):
#直播polling循环 #直播polling循环
self.data = self.api_load(path_setting.POLLING_CONFIG) self.data = self.api_load(path_setting.POLLING_CONFIG)
#直播获取美颜
#self.data = self.api_load(path_setting.BEAUTY_CONFIG)
#搜索结果页-综合/百科tab #搜索结果页-综合/百科tab
def content_v7(self, query, device_id, current_city_id, version, is_first, tab_type, offset): def content_v7(self, query, device_id, current_city_id, version, is_first, tab_type, offset):
#搜索词 #搜索词
...@@ -240,11 +246,24 @@ class janus_request(BaseRequest): ...@@ -240,11 +246,24 @@ class janus_request(BaseRequest):
return self.api_send(self.data["polling"]) 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__': 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")) print(janus_request().product_detail("5857263", "618788", "7.43.0"))
#打印商祥页-sku信息接口返回 #打印商祥页-sku信息接口返回
...@@ -253,11 +272,11 @@ if __name__ == '__main__': ...@@ -253,11 +272,11 @@ if __name__ == '__main__':
print(janus_request().product_coupon_my_list(0, 0)) print(janus_request().product_coupon_my_list(0, 0))
#品类聚合页面商品列表接口返回 #品类聚合页面商品列表接口返回
print(janus_request().tag_service()) # print(janus_request().tag_service())
print("fgx") print("fgx")
#品类聚合页面标签和专场 #品类聚合页面标签和专场
print(janus_request().polymer()) # print(janus_request().polymer())
print("fgx") print("fgx")
#打印次卡-确认订单接口返回 #打印次卡-确认订单接口返回
...@@ -317,4 +336,10 @@ if __name__ == '__main__': ...@@ -317,4 +336,10 @@ if __name__ == '__main__':
#直播-点击【设置封面】 #直播-点击【设置封面】
print("直播-点击【设置封面】") print("直播-点击【设置封面】")
print(janus_request().page_rules("744.2", "beijing", "post_add_pic")) 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"))
...@@ -324,3 +324,27 @@ polling: ...@@ -324,3 +324,27 @@ polling:
data: {} data: {}
json: {} 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
...@@ -543,6 +543,11 @@ PAGE_RULES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", ...@@ -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_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") 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_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") FOLLOW_DEL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "follow_del.yaml")
......
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"]
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"]
beauty:
-
case: "主播获取美颜效果"
channel_id: "739"
assert: 0
\ No newline at end of file
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
...@@ -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 10:43:52 content: ces测试+2021-07-16 11:13:46
message: 请勿回复重复内容 message: 请勿回复重复内容
message1: 回复成功 message1: 回复成功
message2: 你的回复有点频繁,稍后再来 message2: 你的回复有点频繁,稍后再来
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment