Commit cc49eba8 authored by aha's avatar aha

merge common_dev

parents 94aadca8 734b439a
......@@ -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"))
......@@ -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
......@@ -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"):
......@@ -42,7 +48,9 @@ class living_request(BaseRequest):
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
......@@ -47,6 +47,17 @@ 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
......@@ -57,5 +68,3 @@ finish:
channel_id: ${channel_id}
json: {}
isLogin: 1
......@@ -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")
......
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"]
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
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
sendmsg:
#发送弹幕
-
case: "发送弹幕"
channel_id: "726"
msg: "主播可真美"
assert: 0
#弹幕内容包含敏感信息,发送失败
-
case: "弹幕内容包含敏感信息,发送失败"
channel_id: "784"
msg: "黄色图片"
assert: 您输入的内容包含敏感信息,请重新输入
\ No newline at end of file
......@@ -3,7 +3,11 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
<<<<<<< HEAD
content: ces测试+2021-07-20 16:28:33
=======
content: ces测试+2021-07-16 11:13:46
>>>>>>> common_dev
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......@@ -15,4 +19,4 @@ reply_create:
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
replied_id: 35526987
replied_id: 35526987
\ No newline at end of file
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