Commit af75b689 authored by 张淑琴's avatar 张淑琴

Merge branch 'common_dev' into zzsq_dev

parents 1e372194 628c57a8
......@@ -14,8 +14,18 @@ class account_request(BaseRequest):
self.params["face_token"] = face_token
return self.api_send(self.loginvfc["login_vfc"])
# 我的-头像点击
def account_homepage(self, user_id, device_id):
self.params["user_id"] = user_id
self.params["device_id"] = device_id
return self.api_send(self.loginvfc["account_homepage"])
if __name__ == '__main__':
# print(account_request().user_info())
print(account_request.loginvfc(""))
\ No newline at end of file
print(account_request.loginvfc(""))
print(account_request().account_homepage("33910245", "androidid_16a95f3fa31a4c0b"))
\ No newline at end of file
......@@ -12,3 +12,12 @@ login_vfc:
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
account_homepage:
method: get
url: /api/account/homepage
params:
user_id: ${user_id}
device_id: ${device_id}
data:
json: {}
isLogin: 1
\ No newline at end of file
......@@ -19,11 +19,21 @@ class conversation_request(BaseRequest):
self.params["offset_msg_id"] = offset_msg_id
return self.api_send(self.messageread["detail_messageid"])
#直播间私信主播
def detail_live(self, referrer_id):
# self.params["referrer"] = referrer
self.params["referrer_id"] = referrer_id
# self.params["last_msg_id"] = last_msg_id
# self.params["offset_msg_id"] = offset_msg_id
return self.api_send(self.messageread["detail_live"])
if __name__ == '__main__':
print(conversation_request().message_read("beijing", 1,'[10622,10626,10646,10651]'))
print("---------")
print(conversation_request().detail_messageid(10, 0, 0))
print(conversation_request().detail_live(737))
......
......@@ -22,3 +22,16 @@ detail_messageid:
json: {}
isLogin: 1 #需要登录的接口
#直播间私信主播
detail_live:
method: get
url: /api/conversation/detail/33909791_33910245
params:
referrer: ${referrer}
# referrer_id: ${referrer_id}
# last_msg_id: ${last_msg_id}
# offset_msg_id: ${offset_msg_id}
data: {}
json: {}
isLogin: 1
......@@ -9,6 +9,8 @@ class live_request(BaseRequest):
self.data = self.api_load(path_setting.SEARCHSERVICE_CONFIG)
self.data = self.api_load(path_setting.ADDLIVESERVICE_CONFIG)
self.data = self.api_load(path_setting.POP_SERVICE_CONFIG)
self.data = self.api_load(path_setting.POP_GIFT_CONFIG)
self.data = self.api_load(path_setting.GET_GIFT_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.M_GET_CHANNEL_STATUS_CONFIG)
......@@ -68,6 +70,19 @@ class live_request(BaseRequest):
self.params["version"] = version
return self.api_send(self.data["pop_service"])
#om后台-弹出美券
def pop_gift(self, stream_id, gift_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["stream_id"] = stream_id
self.params["gift_id"] = gift_id
self.params["version"] = version
return self.api_send(self.data["pop_gift"])
#用户-领取美券
def get_gift(self, gift_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["gift_id"] = gift_id
self.params["version"] = version
return self.api_send(self.data["get_gift"])
#主播-推荐袋删除商品
def delete_live_service(self, channel_id, live_service_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
......@@ -119,4 +134,6 @@ if __name__ == '__main__':
#print(live_request().m_get_channel_status("745", "7.46.0"))
# print(live_request().mark_live_service("4233", "745", "7269", "1", "746.0"))
# print(live_request().audience_services("4179","739","0","20"))
print(live_request().pop_service("4266", "7324", "1", "746.0"))
\ No newline at end of file
# print(live_request().pop_service("4266", "7324", "1", "746.0"))
# print(live_request().pop_gift("4271", "59124", "746.0"))
print(live_request().get_gift( "59124", "746.0"))
\ No newline at end of file
......@@ -52,7 +52,7 @@ add_live_service:
json: {}
isLogin: 1
#主播-添加商品后,购物车上方弹出商品卡片
#主播-添加商品后,购物车上方弹出商品卡片
pop_service:
method: GET
url: /api/janus/live/pop_service
......@@ -62,7 +62,30 @@ pop_service:
pop_type: ${pop_type}
version: ${version}
data: {}
json: { }
json: {}
isLogin: 1
#om后台-弹出美券
pop_gift:
method: GET
url: /api/janus/live/pop_gift
params:
stream_id: ${stream_id}
gift_id: ${gift_id}
version: ${version}
data: {}
json: {}
isLogin: 1
#用户-领取美券
get_gift:
method: POST
url: /api/janus/live/get_gift
params:
version: ${version}
data:
gift_id: ${gift_id}
json: {}
isLogin: 1
#主播-推荐袋删除商品
......
......@@ -119,6 +119,21 @@ class user_request(BaseRequest):
return self.api_send(self.data["favors_topics"])
# 我的-收藏-帖子
def favors_tractate(self, page, count):
self.params["page"] = page
self.params["count"] = count
return self.api_send(self.data["favors_tractate"])
# 我的-收藏-回答
def favors_answers(self, page, count):
self.params["page"] = page
self.params["count"] = count
return self.api_send(self.data["favors_answers"])
......@@ -158,6 +173,12 @@ if __name__ == '__main__':
# 我的-收藏-日记贴
print(user_request().favors_topics(0, 10))
# 我的-收藏-帖子
print(user_request().favors_tractate(1, 10))
# 我的-收藏-帖子
print(user_request().favors_answers(1, 10))
......@@ -157,3 +157,25 @@ favors_topics:
isLogin: 1
# 我的-收藏-帖子
favors_tractate:
method: GET
url: /api/user/favors/tractate
params:
page: ${page}
count: ${count}
data: {}
json: {}
isLogin: 1
# 我的-收藏-回答
favors_answers:
method: GET
url: /api/user/favors/answers
params:
page: ${page}
count: ${count}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
......@@ -4,7 +4,7 @@ from in_common.base_request import BaseRequest
class achelous_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.ACHELOUS_REQUEST_CONFIG)
#直播间批量添加商品
def batch_add_service(self, stream_id, service_item_ids):
self.params["stream_id"] = stream_id
self.params["service_item_ids"] = service_item_ids
......
#批量添加直播间商品
batch_add_service:
method: post
url: /achelous/live/batch_add_service
......
......@@ -305,6 +305,8 @@ DETAIL_MESSAGEID = os.path.join(BASE_DIR, "backend_auto/test_backend_data/conver
#消息
MESSAGE_READ_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "conversation_request.yaml")
MESSAGE_READ = os.path.join(BASE_DIR, "backend_auto/test_backend_data/conversation_data", "message_read.yaml")
#直播私信主播
DETAIL_LIVE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/conversation_data", "detail_live.yaml")
#消息页未读数
UNREAD_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "notification_request.yaml")
......@@ -623,6 +625,14 @@ ADDLIVESERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_li
POP_SERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
POP_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "pop_service.yaml")
#OM后台-弹出美券
POP_GIFT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
POP_GIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "pop_gift.yaml")
#用户-领取美券
GET_GIFT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
GET_GIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "get_gift.yaml")
#主播-推荐袋删除商品
DELETELIVESERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
DELETELIVESERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "delete_live_service.yaml")
......@@ -707,5 +717,18 @@ FAVORS_TOPICS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data
#直播-新增标签
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")
#我的-收藏-帖子
FAVORS_TRACTATE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
FAVORS_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "favors_tractate.yaml")
#我的-收藏-帖子
FAVORS_ANSWERS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
FAVORS_ANASWERS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "favors_answers.yaml")
#我的-头像点击
ACCOUNT_HOMEPAGE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "account_request.yaml")
ACCOUNT_HOMEPAGE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data", "account_homepage.yaml")
if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG)
\ No newline at end of file
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.account_request import account_request
class TestAccount_Homepage:
data = BaseRequest().api_load(path_setting.ACCOUNT_HOMEPAGE)
account_homepage_case, account_homepage_data = get_ids(data, "account_homepage")
@pytest.mark.parametrize("param", account_homepage_data, ids=account_homepage_case)
def test_account_homepage(self, param):
r = account_request().account_homepage(param["user_id"], param["device_id"])
assert r["error"] == param["assert"]
import pytest
import path_setting
from ids_list import get_ids
from in_common.base_request import BaseRequest
from all_backend_api.conversation_request import conversation_request
class TestDetailLive:
data = BaseRequest().api_load(path_setting.DETAIL_LIVE)
detail_live_case, detail_live_data = get_ids(data, "detail_live")
@pytest.mark.parametrize("param",detail_live_data,ids=detail_live_case)
def test_detail_live(self,param):
r = conversation_request().detail_live(param["referrer_id"])
if r["error"] == 0:
assert r["error"] == param["assert"]
\ No newline at end of file
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 TestGetGift:
data = BaseRequest().api_load(path_setting.GET_GIFT)
get_gift_case, get_gift_data = get_ids(data, "get_gift")
@pytest.mark.parametrize("param", get_gift_data, ids=get_gift_case)
def test_get_gift(self,param):
r = live_request().get_gift(param["gift_id"], param["version"])
if r["message"] == "领取成功!":
print("用户成功领取美券~")
assert r["data"]["has_gift_left"] == param["assert"]
else:
print("出错了!!!")
\ No newline at end of file
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 TestPopGift:
data = BaseRequest().api_load(path_setting.POP_GIFT)
pop_gift_case, pop_gift_data = get_ids(data, "pop_gift")
@pytest.mark.parametrize("param", pop_gift_data, ids=pop_gift_case)
def test_pop_gift(self,param):
r = live_request().pop_gift(param["stream_id"], param["gift_id"], param["version"])
if r["data"] is not None:
print("成功弹出美券")
assert r["data"]["gift_id"] == param["assert"]
else:
print("出错了!!!")
\ No newline at end of file
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.user_request import user_request
class TestFavorsAnswers:
data = BaseRequest().api_load(path_setting.FAVORS_ANASWERS)
favors_answers_case, favors_answers_data = get_ids(data, "favors_answers")
@pytest.mark.parametrize("param", favors_answers_data, ids=favors_answers_case)
def test_favors_answers(self, param):
r = user_request().favors_answers(param["page"], param["count"])
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.user_request import user_request
class TestFavorsTractate:
data = BaseRequest().api_load(path_setting.FAVORS_TRACTATE)
favors_tractate_case, favors_tractate_data = get_ids(data, "favors_tractate")
@pytest.mark.parametrize("param", favors_tractate_data, ids=favors_tractate_case)
def test_favors_tractate(self, param):
r = user_request().favors_tractate(param["page"], param["count"])
assert r["error"] == param["assert"]
account_homepage:
#我的-头像点击
-
case: "我的页面-头像点击"
user_id: 33910245
device_id: androidid_16a95f3fa31a4c0b
assert: 0
detail_live:
-
case: "直播私信主播"
referrer_id: 737
assert: 0
\ No newline at end of file
get_gift:
#用户-领取美券
-
case: "用户-领取美券"
gift_id: "59124"
version : "7.46.0"
assert: 1
\ No newline at end of file
pop_gift:
#在om后台添加美券后,点击弹出,直播间弹出美券
-
case: "在om后台添加美券后,点击弹出,直播间弹出美券"
stream_id: "4271"
gift_id: "59124"
version : "7.46.0"
assert: 59124
\ No newline at end of file
......@@ -3,7 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-07-28 19:16:19
content: ces测试+2021-07-30 15:42:50
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......
favors_answers:
#我的-收藏-回答
-
case: "我的页面-收藏-回答"
page: 1
count: 10
assert: 0
favors_tractate:
#我的-收藏-帖子
-
case: "我的页面-收藏-帖子"
page: 1
count: 10
assert: 0
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