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

消息内容

parent a65b5aed
......@@ -9,13 +9,18 @@ class conversation_request(BaseRequest):
def message_read(self,current_city_id,release,message_ids):
self.params["current_city_id"] = current_city_id
self.params["release"] = release
#self.params["uqid"] = uqid
self.params["message_ids"] = message_ids
return self.api_send(self.messageread["message_read"])
def detail_messageid(self,os_version,last_msg_id,offset_msg_id):
self.params["os_version"] = os_version
self.params["last_msg_id"] = last_msg_id
self.params["offset_msg_id"] = offset_msg_id
return self.api_send(self.messageread["detail_messageid"])
if __name__ == '__main__':
print(conversation_request().message_read("beijing", 1,'[10622,10626,10646,10651]'))
print(conversation_request().detail_messageid(10, 0, 0))
......
......@@ -8,5 +8,17 @@ message_read:
data:
message_ids: ${message_ids}
json: {}
isLogin: 1 #需要登录的接口
detail_messageid:
method: get
url: /api/conversation/detail/602329_33910245/
params:
os_version: ${os_version}
last_msg_id: ${last_msg_id}
offset_msg_id: ${offset_msg_id}
data: {}
json: {}
isLogin: 1 #需要登录的接口
\ No newline at end of file
......@@ -65,6 +65,7 @@ MY_CONVERSATION = os.path.join(BASE_DIR, "backend_auto/test_backend_data/my_conv
#消息
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_MESSAGEID = os.path.join(BASE_DIR, "backend_auto/test_backend_data/conversation_data", "detail_messageid.yaml")
#消息页未读数
UNREAD_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "notification_request.yaml")
......
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.conversation_request import conversation_request
class TestDetailMessageid:
data = BaseRequest().api_load(path_setting.DETAIL_MESSAGEID)
detailmessageid_case, detailmessageid_data = get_ids(data, "detail_messageid")
@pytest.mark.parametrize("param",detailmessageid_data,ids=detailmessageid_case)
def test_detail_messageid(self,param):
r = conversation_request().detail_messageid(param["os_version"], param["last_msg_id"], param["offset_msg_id"])
if r["error"] == 0:
results = r.get("data").get("results", [])
assert len(results) <= param["assert"]
detail_messageid:
#验证成功case
-
case: "私信详情页最新一页的消息内容"
os_version: 10
last_msg_id: 0
offset_msg_id: 0
assert: 20
\ 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