Commit 05b5dced authored by 张淑琴's avatar 张淑琴

发送商品

parent b35c8351
......@@ -31,6 +31,9 @@ class web_request(BaseRequest):
self.params["page"] = page
return self.api_send(self.ACCOUNT_URL["conversation_unread_list"])
def service(self):
return self.api_send(self.ACCOUNT_URL["service"])
......@@ -44,4 +47,5 @@ if __name__ == '__main__':
print(web_request().conversation(0, 1))
print(web_request().service_offline("209992", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web_request().conversation_unread_list(1))
print(web_request().service())
......@@ -57,3 +57,10 @@ conversation_unread_list:
json: {}
isLogin: 1 #需要登录
service:
method: get
url: /api/web/service
param: {}
data: {}
json: {}
isLogin: 1 #需要登录
......@@ -179,6 +179,8 @@ REPLY_ANSWER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/question_d
CONVERSATION = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "conversation.yaml")
#医生后台--未读私信列表
CONVERSATIONUNREADLIST = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "conversation_unread_list.yaml")
#医生后台--点击发送商品按钮
SERVICE = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "service.yaml")
if __name__ == '__main__':
......
......@@ -7,13 +7,13 @@ from all_doctor_api.web_request import web_request
class TestConversationUnreadList:
data = BaseRequest().api_load(path_setting.CONVERSATION)
unreadlist_case, unreadlist_data = get_ids(data, "conversation")
data = BaseRequest().api_load(path_setting.CONVERSATIONUNREADLIST)
unreadlist_case, unreadlist_data = get_ids(data, "conversation_unread_list")
@pytest.mark.parametrize("param",unreadlist_data,ids=unreadlist_case)
def test_conversation_unread_list(self, param):
'''全部私信列表'''
'''未读私信列表'''
r = web_request().conversation_unread_list(param["page"])
if r["error"] == 0:
conversation = r.get("data").get("conversation", [])
......
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request
class TestService:
data = BaseRequest().api_load(path_setting.SERVICE)
service_case, service_data = get_ids(data, "service")
@pytest.mark.parametrize("param",service_data,ids=service_case)
def test_service(self, param):
'''未读私信列表'''
r = web_request().service()
if r["error"] == 0:
data = r.get("data").get("data", [])
assert len(data) <= param["assert"]
assert r["data"]["size"] <= param["assert_size"]
conversation_unread_list:
#全部私信case
#未读私信case
-
case: "请求成功,有未读消息"
page: 1
......
service:
#私信点击发送商品case
-
case: "点击私信发送商品按钮"
#page: 1
assert_size: 10
assert: 10
\ 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