Commit 9e7ba03f authored by edz's avatar edz

直播间私信主播

parent c5603cc1
......@@ -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
......@@ -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")
......
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
detail_live:
-
case: "直播私信主播"
referrer_id: 737
assert: 0
\ 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