Commit 4bef8f77 authored by 张淑琴's avatar 张淑琴

获取页面类型

parent 64702c5c
......@@ -6,14 +6,14 @@ class im_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.CONVERSATION_DETAIL_CONFIG)
#def conversation_detail(self, current_city_id, begin_msg_id, conversation_type, end_msg_id,referrer):
def conversation_detail(self, current_city_id, begin_msg_id, conversation_type, end_msg_id,referrer):
#咨询师聊天详情页
#self.params["current_city_id"] = current_city_id
#self.params["begin_msg_id"] = begin_msg_id
#self.params["conversation_type"] = conversation_type
#self.params["end_msg_id"] = end_msg_id
#self.params["referrer"] = referrer
#return self.api_send(self.data["conversation_detail"])
self.params["current_city_id"] = current_city_id
self.params["begin_msg_id"] = begin_msg_id
self.params["conversation_type"] = conversation_type
self.params["end_msg_id"] = end_msg_id
self.params["referrer"] = referrer
return self.api_send(self.data["conversation_detail"])
#该接口已下线
def auto_msg(self, trace_id, conversation_id):
......
import path_setting
from in_common.base_request import BaseRequest
class web3_request(BaseRequest):
def __init__(self):
self.CONVERSATION_ROBOT = self.api_load(path_setting.CONVERSATION_ROBOT)
def conversation_robot_get_page(self):
return self.api_send(self.CONVERSATION_ROBOT["conversation_robot_get_page"])
if __name__ == '__main__':
print(web3_request().conversation_robot_get_page())
conversation_robot_get_page:
method: get
url: /api/web3/conversation/robot/get_page
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -480,6 +480,11 @@ CONVERSATIONCOUPON=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_dat
#医生后台-发送私信
CONVERSATIONUSERID=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "conversation_user_id.yaml")
#医生后台-私信机器人
CONVERSATION_ROBOT = os.path.join(BASE_DIR, "backend_auto/all_doctor_api", "web3_request.yaml")
ROBOTGETPAGE= os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web3_data", "conversation_robot_get_page.yaml")
#医生后台-服务资源
ADTYPELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "artemis_ad_type_list.yaml")
#医生后台-我的购物车
......
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web3_request import web3_request
class TestConversationRobotGetPage:
data = BaseRequest().api_load(path_setting.ROBOTGETPAGE)
robot_get_page_case, robot_get_page_data = get_ids(data, "conversation_robot_get_page")
@pytest.mark.parametrize("param",robot_get_page_data,ids=robot_get_page_case)
def test_conversation_robot_get_page(self, param):
'''私信机器人-获取页面类型'''
r = web3_request().conversation_robot_get_page()
if r["error"] == 0:
#flows_list = r.get("data").get("flows_list", [])
assert r["data"]["1"] == param["assert1"]
assert r["data"]["2"] == param["assert2"]
assert r["data"]["3"] == param["assert3"]
conversation_robot_get_page:
#私信机器人-获取页面类型
-
case: "私信机器人-获取页面类型"
#month: "2021-7"
assert1: "商品详情页"
assert2: "机构主页"
assert3: "医生主页"
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