Commit 74792e9c authored by 邓莹莹's avatar 邓莹莹

解决冲突

parents 6c696aac 42611742
......@@ -13,9 +13,16 @@ class conversation_request(BaseRequest):
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))
......
......@@ -9,4 +9,16 @@ message_read:
message_ids: ${message_ids}
json: {}
isLogin: 1 #需要登录的接口
\ No newline at end of file
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 #需要登录的接口
import path_setting
from in_common.base_request import BaseRequest
class filter_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.FILTER_CONFIG)
def service_home_city_v2(self, current_city_id, lat, lng):
print("fgx")
self.params["current_city_id"] = current_city_id
self.params["lat"] = lat
self.params["lng"] = lng
return self.api_send(self.data["service_home_city_v2"])
if __name__ == '__main__':
#城市筛选器
print(filter_request().service_home_city_v2("", "40.002", "116.487252"))
print("fgx")
service_home_city_v2:
method: GET
url: /api/filter/service_home_city_v2
params:
current_city_id: ${current_city_id}
lat: ${lat}
lng: ${lng}
data: {}
json: {}
......@@ -4,6 +4,9 @@ from in_common.base_request import BaseRequest
class search_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.KEYWORDS_CONFIG)
#品类聚合页面医生tab列表
self.data = self.api_load(path_setting.HOSPITAL_CONFIG)
self.data = self.api_load(path_setting.KEYWORDS_CONFIG) #keywords路径
self.data = self.api_load(path_setting.CONTENTV6_CONFIG) #content_v6路径
self.data = self.api_load(path_setting.HOT_CONFIG) # hot路径
......@@ -38,3 +41,18 @@ class search_request(BaseRequest):
def hot(self, version, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
self.params["version"] = version
return self.api_send(self.data["hot"])
# 品类聚合页面医生tab列表
def hospital(self, cp_id, tag_id, q, count, device_id):
self.params["cp_id"] = cp_id
self.params["tag_id"] = tag_id
self.params["q"] = q
self.params["count"] = count
self.params["device_id"] = device_id
return self.api_send(self.data["hospital"])
if __name__ == '__main__':
# 打印购物车-猜你喜欢列表接口返回
print(search_request().hospital(82, [], "眼部整形", 10, "869378034450718"))
......@@ -35,4 +35,17 @@ hot:
url: /api/search/hot
#列出所有定义函数时的参数
params:
version: ${version}
\ No newline at end of file
version: ${version}
#品类聚合页面医生tab列表
hospital:
method: get
url: /api/search/v2/hospital
params:
cp_id: ${cp_id}
tag_id: ${tag_id}
q: ${q}
count: ${count}
device_id: ${device_id}
data: {}
json: {}
\ No newline at end of file
import path_setting
from in_common.base_request import BaseRequest
class visual_beauty_card_request(BaseRequest):
def __init__(self):
#自定义专题-更美次卡橱窗组件商品
self.data = self.api_load(path_setting.VISUAL_BEAUTY_CARD_SERVICES_CONFIG)
#自定义专题-更美次卡商品列表筛选器
self.data = self.api_load(path_setting.BEAUTYCARD_FILTERS_CONFIG)
#自定义专题-更美次卡橱窗组件商品
def visual_beauty_card_services(self, unit_id, current_city_id, page, page_size, version, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
self.params["unit_id"] = unit_id
self.params["current_city_id"] = current_city_id
self.params["page"] = page
self.params["page_size"] = page_size
self.params["version"] = version
return self.api_send(self.data['visual_beauty_card_services'])
#自定义专题-更美次卡商品列表筛选器
def beautycard_filters(self, unit_id, current_city_id, version, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
self.params["unit_id"] = unit_id
self.params["current_city_id"] = current_city_id
self.params["version"] = version
return self.api_send(self.data['beautycard_filters'])
#自定义专题-更美次卡商品列表组件商品
def beautycard_skus(self, unit_id, tag_id, area, sort_type, page, page_size, device_id = '97B6764B-2135-4761-9911-701C38CBC272'):
self.params["unit_id"] = unit_id
self.params["tag_id"] = tag_id
self.params["area"] = area
self.params["sort_type"] = sort_type
self.params["page"] = page
self.params["page_size"] = page_size
return self.api_send(self.data['beautycard_skus'])
\ No newline at end of file
visual_beauty_card_services:
method: GET
url: /api/janus/visual_beauty_card/services
params:
#组件id
unit_id : ${unit_id}
current_city_id : ${current_city_id}
#分页
page : ${page}
#分页大小
page_size : ${page_size}
version : ${version}
data: {}
json: {}
beautycard_filters:
method: GET
url: /api/janus/visual_beauty_card/list_unit/filters
params:
#组件id
unit_id : ${unit_id}
current_city_id : ${current_city_id}
version : ${version}
data: {}
json: {}
beautycard_skus:
method: GET
url: /api/janus/visual_beauty_card/list_unit/skus
params:
#组件id
unit_id : ${unit_id}
#类型筛选器(-1: 全部类型)
tag_id : ${tag_id}
#城市筛选器
area : ${area}
#排序方式(0: 默认排序, 1: 销量排序, 2: 价格排序, 3: 上架时间排序)
sort_type : ${sort_type}
#分页
page : ${page}
#分页大小
page_size : ${page_size}
data: {}
json: {}
......@@ -20,8 +20,25 @@ class web_request(BaseRequest):
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
return self.api_send(self.ACCOUNT_URL["service_offline"])
def conversation(self, is_star, page):
self.params["is_star"] = is_star
self.params["page"] = page
return self.api_send(self.ACCOUNT_URL["conversation"])
def conversation_unread_list(self, page):
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"])
def conversation_diary(self, doctor_user_id):
self.params["doctor_user_id"] = doctor_user_id
return self.api_send(self.ACCOUNT_URL["conversation_diary"])
def conversation_coupon(self, doctor_user_id):
self.params["doctor_user_id"] = doctor_user_id
return self.api_send(self.ACCOUNT_URL["conversation_coupon"])
if __name__ == '__main__':
......@@ -29,3 +46,9 @@ if __name__ == '__main__':
print(web_request().article_videotoken())
print(web_request().doctor_submechanisms())
print(web_request().service_offline("209992", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web_request().conversation(0, 1))
print(web_request().conversation_unread_list(1))
print(web_request().service())
print("发送")
print(web_request().conversation_diary(602329))
print(web_request().conversation_coupon(602329))
......@@ -36,3 +36,48 @@ service_offline:
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
json: {}
isLogin: 1
conversation:
method: get
url: /api/web/conversation
params:
is_star: ${is_star}
page: ${page}
data: {}
json: {}
isLogin: 1 #需要登录
conversation_unread_list:
method: get
url: /api/web/conversation/unread_list
params:
page: ${page}
data: {}
json: {}
isLogin: 1 #需要登录
service:
method: get
url: /api/web/service
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
conversation_diary:
method: get
url: /api/web/conversation/diary
params:
doctor_user_id: ${doctor_user_id}
data: {}
json: {}
isLogin: 1 #需要登录
conversation_coupon:
method: get
url: /api/web/conversation/coupon
params:
doctor_user_id: ${doctor_user_id}
data: {}
json: {}
isLogin: 1 #需要登录
develop_host:
backend: http://backend.paas-develop.env
# doctor: http://doctor.paas-develop.env
doctor: http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
......@@ -138,6 +138,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")
......@@ -241,6 +242,38 @@ REPLY_ANSWER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/question_d
#回答详情页
DETAIL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "answer_request.yaml")
DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/answer_data", "detail.yaml")
#品类聚合页面医生tab列表
HOSPITAL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "search_request.yaml")
HOSPITAL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/search_data", "hospital.yaml")
#城市筛选器
FILTER_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "filter_request.yaml")
FILTER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/filter_data", "service_home_city_v2.yaml")
#医生后台-全部私信列表
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")
#医生后台-发送案例
CONVERSATIONDIARY=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "conversation_diary.yaml")
#医生后台-发送优惠券
CONVERSATIONCOUPON=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "conversation_coupon.yaml")
#更美次卡橱窗组件商品
VISUAL_BEAUTY_CARD_SERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "visual_beauty_card.yaml")
VISUAL_BEAUTY_CARD_SERVICES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/visual_beauty_card_data", "visual_beauty_card_services.yaml")
#次卡商品列表组件筛选器
BEAUTYCARD_FILTERS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "visual_beauty_card.yaml")
BEAUTYCARD_FILTERS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/visual_beauty_card_data", "beautycard_filters.yaml")
#次卡商品列表组件商品
BEAUTYCARD_SKUS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "visual_beauty_card.yaml")
BEAUTYCARD_SKUS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/visual_beauty_card_data", "beautycard_skus.yaml")
#普通美购提交订单页
PREVIEW_V1 = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "settlement_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"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.filter_request import filter_request
class TestServiceHomeCityV2:
data = BaseRequest().api_load(path_setting.FILTER)
servicehomecityv2_case, servicehomecityv2_data = get_ids(data, "service_home_city_v2")
@pytest.mark.parametrize("param", servicehomecityv2_data, ids=servicehomecityv2_case)
def test_service_home_city_v2(self, param):
r = filter_request().service_home_city_v2(param["current_city_id"], param["lat"], param["lng"])
# print('feng=', r)
if r["error"] == 0:
assert len(r["data"]["area"]) > 0
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.search_request import search_request
class TestHospital:
data = BaseRequest().api_load(path_setting.HOSPITAL)
hospital_case, hospital_data = get_ids(data, "hospital")
@pytest.mark.parametrize("param", hospital_data, ids=hospital_case)
def test_hospital(self, param):
r = search_request().hospital(param["cp_id"], param["tag_id"], param["q"], param["count"], param["device_id"])
# print('feng=', r)
if r["error"] == 0:
assert r["data"] != param["assert"]
import pytest
import path_setting
from all_backend_api.visual_beauty_card import visual_beauty_card_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#次卡商品列表筛选器接口
class TestBeautyCardFilters:
data = BaseRequest().api_load(path_setting.BEAUTYCARD_FILTERS)
beautycard_filters_case, beautycard_filters_data = get_ids(data, "beautycard_filters")
@pytest.mark.parametrize("param", beautycard_filters_data, ids=beautycard_filters_case)
def test_beautycard_filters(self, param):
print('次卡商品列表筛选器')
r = visual_beauty_card_request().beautycard_filters(param["unit_id"], param["current_city_id"], param["version"])
if r["data"]:
print('次卡商品列表筛选器下拉列表有值')
assert len(r["data"]["field"]) != param["assert"]
assert len(r["data"]["areas"]) != param["assert"]
assert len(r["data"]["order"]) != param["assert"]
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.visual_beauty_card import visual_beauty_card_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#次卡商品列表组件商品
class TestBeautyCardSkus:
data = BaseRequest().api_load(path_setting.BEAUTYCARD_SKUS)
beautycard_skus_case, beautycard_skus_data = get_ids(data, "beautycard_skus")
@pytest.mark.parametrize("param", beautycard_skus_data, ids=beautycard_skus_case)
def test_beautycard_skus(self, param):
print('次卡商品列表组件商品')
r = visual_beauty_card_request().beautycard_skus(param["unit_id"], param["tag_id"], param["area"], param["sort_type"], param["page"], param["page_size"])
if r["data"]:
print('次卡商品列表组件有商品召回')
assert len(r["data"]["beautycards"]) != param["assert"]
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.visual_beauty_card import visual_beauty_card_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#次卡橱窗商品
class TestVisualBeautyCardServices:
data = BaseRequest().api_load(path_setting.VISUAL_BEAUTY_CARD_SERVICES)
visual_beauty_card_services_case, visual_beauty_card_services_data = get_ids(data, "visual_beauty_card_services")
@pytest.mark.parametrize("param", visual_beauty_card_services_data, ids=visual_beauty_card_services_case)
def test_visual_beauty_card_services(self, param):
print('次卡橱窗')
r = visual_beauty_card_request().visual_beauty_card_services(param["unit_id"], param["current_city_id"], param["page"], param["page_size"], param["version"])
if r["data"]["beautycards"]:
print('次卡橱窗有商品')
assert len(r["data"]["beautycards"]) != param["assert"]
\ No newline at end of file
detail_messageid:
#验证成功case
-
case: "私信详情页最新一页的消息内容"
os_version: 10
last_msg_id: 0
offset_msg_id: 0
assert: 20
#城市筛选器
service_home_city_v2:
-
case: "城市筛选器接口"
current_city_id: ""
lat: "40.002"
lng: "116.487252"
assert: 0
hospital:
#品类聚合页医生tab
-
case: "品类聚合页面医生tab"
assert: null
cp_id: 82
tag_id: []
q: "眼部整形"
count: 10
device_id: 869378034450718
beautycard_filters:
-
#更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常
case: "更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常"
unit_id: "20109"
current_city_id: "beijing"
version: "743.0"
assert: 0
-
#更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常
case: "更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常"
unit_id: "20113"
current_city_id: "beijing"
version: "743.0"
assert: 0
\ No newline at end of file
beautycard_skus:
-
#更美次卡商品列表组件商品-按SPU导入,商品默认排序
case: "更美次卡商品列表组件商品-按SPU导入,商品默认排序"
unit_id: "20109"
tag_id: "-1"
area: "worldwide"
sort_type: "0"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SKU导入,商品默认排序
case: "更美次卡商品列表组件商品-按SKU导入,商品默认排序"
unit_id: "20113"
tag_id: "-1"
area: "worldwide"
sort_type: "0"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SPU导入,商品价格最低
case: "更美次卡商品列表组件商品-按SPU导入,商品价格最低"
unit_id: "20110"
tag_id: "-1"
area: "worldwide"
sort_type: "2"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SKU导入,商品价格最低
case: "更美次卡商品列表组件商品-按SKU导入,商品价格最低"
unit_id: "20114"
tag_id: "-1"
area: "worldwide"
sort_type: "2"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SPU导入,商品销量最高
case: "更美次卡商品列表组件商品-按SPU导入,商品销量最高"
unit_id: "20111"
tag_id: "-1"
area: "worldwide"
sort_type: "1"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SKU导入,商品销量最高
case: "更美次卡商品列表组件商品-按SKU导入,商品销量最高"
unit_id: "20115"
tag_id: "-1"
area: "worldwide"
sort_type: "1"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SPU导入,商品最新上架
case: "更美次卡商品列表组件商品-按SPU导入,商品最新上架"
unit_id: "20112"
tag_id: "-1"
area: "worldwide"
sort_type: "3"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SKU导入,商品最新上架
case: "更美次卡商品列表组件商品-按SKU导入,商品最新上架"
unit_id: "20116"
tag_id: "-1"
area: "worldwide"
sort_type: "3"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SPU导入,修改城市筛选器为北京,商品正常召回
case: "更美次卡商品列表组件商品-按SPU导入,修改城市筛选器为北京,商品正常召回"
unit_id: "20110"
tag_id: "-1"
area: "beijing"
sort_type: "2"
page: "0"
page_size: "20"
assert: 0
-
#更美次卡商品列表组件商品-按SKU导入,修改城市筛选器为北京,商品正常召回
case: "更美次卡商品列表组件商品-按SKU导入,修改城市筛选器为北京,商品正常召回"
unit_id: "20115"
tag_id: "-1"
area: "beijing"
sort_type: "1"
page: "0"
page_size: "20"
assert: 0
visual_beauty_card_services:
-
#更美次卡橱窗-按SPU导入,定位北京,商品正常召回
case: "更美次卡橱窗-按SPU导入,定位北京,商品正常召回"
unit_id: "20105"
current_city_id: "beijing"
page: "0"
page_size: "50"
version: "743.0"
assert: 0
-
#更美次卡橱窗-按SKU导入,定位北京,商品正常召回
case: "更美次卡橱窗-按SKU导入,定位北京,商品正常召回"
unit_id: "20106"
current_city_id: "beijing"
page: "0"
page_size: "50"
version: "743.0"
assert: 0
\ 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_doctor_api.web_request import web_request
class TestConversation:
data = BaseRequest().api_load(path_setting.CONVERSATION)
conversation_case, conversation_data = get_ids(data, "conversation")
@pytest.mark.parametrize("param",conversation_data,ids=conversation_case)
def test_conversation(self, param):
'''全部私信列表'''
r = web_request().conversation(param["is_star"], param["page"])
if r["error"] == 0:
conversation = r.get("data").get("conversation", [])
assert len(conversation) <= param["assert"]
assert r["data"]["size"] <= param["assert_size"]
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.CONVERSATIONCOUPON)
conversationcoupon_case, conversationcoupon_data = get_ids(data, "conversation_coupon")
@pytest.mark.parametrize("param",conversationcoupon_data,ids=conversationcoupon_case)
def test_conversation_coupon(self, param):
'''发送美券按钮'''
r = web_request().conversation_coupon(param["doctor_user_id"])
if r["error"] == 0:
data1 = r.get("data", [])
assert len(data1) >= param["assert"]
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 TestConversationDiary:
data = BaseRequest().api_load(path_setting.CONVERSATIONDIARY)
conversationdiary_case, conversationdiary_data = get_ids(data, "conversation_diary")
@pytest.mark.parametrize("param",conversationdiary_data,ids=conversationdiary_case)
def test_conversation_diary(self, param):
'''点击发送案例按钮'''
r = web_request().conversation_diary(param["doctor_user_id"])
print(r)
if r["error"] == 0:
data = r.get("data", [])
assert len(data) >= param["assert"]
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 TestConversationUnreadList:
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", [])
assert len(conversation) <= param["assert"]
assert r["data"]["size"] <= param["assert_size"]
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:
#全部私信case
-
case: "请求成功,有数据返回的第一页数据"
is_star: 0
page: 1
assert_size: 10
assert: 10
conversation_coupon:
#私信点击发送优惠券case
-
case: "点击私信发送优惠券按钮"
doctor_user_id: "602329"
assert: 0
-
case: "点击私信发送优惠券按钮接口报错"
doctor_user_id: "602329"
assert: 0
assert_message: '缺少参数: doctor_user_id'
assert_data: None
conversation_diary:
#私信点击发送案例case
-
case: "点击私信发送案例按钮"
doctor_user_id: 602329
assert: 0
conversation_unread_list:
#未读私信case
-
case: "请求成功,有未读消息"
page: 1
assert_size: 10
assert: 10
service:
#私信点击发送商品case
-
case: "点击私信发送商品按钮"
#page: 1
assert_size: 10
assert: 10
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