Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
backend_auto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邓莹莹
backend_auto
Commits
74792e9c
Commit
74792e9c
authored
Jun 08, 2021
by
邓莹莹
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
6c696aac
42611742
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
730 additions
and
4 deletions
+730
-4
conversation_request.py
all_backend_api/conversation_request.py
+7
-0
conversation_request.yaml
all_backend_api/conversation_request.yaml
+13
-2
filter_request.py
all_backend_api/filter_request.py
+23
-0
filter_request.yaml
all_backend_api/filter_request.yaml
+11
-0
search_request.py
all_backend_api/search_request.py
+18
-0
search_request.yaml
all_backend_api/search_request.yaml
+15
-2
visual_beauty_card.py
all_backend_api/visual_beauty_card.py
+40
-0
visual_beauty_card.yaml
all_backend_api/visual_beauty_card.yaml
+47
-0
web_request.py
all_doctor_api/web_request.py
+23
-0
web_request.yaml
all_doctor_api/web_request.yaml
+45
-0
host.yaml
host.yaml
+1
-0
path_setting.py
path_setting.py
+33
-0
test_detail_messageid.py
test_backend_case/conversation_case/test_detail_messageid.py
+19
-0
__init__.py
test_backend_case/filter_case/__init__.py
+0
-0
test_service_home_city_v2.py
test_backend_case/filter_case/test_service_home_city_v2.py
+19
-0
test_hospital.py
test_backend_case/search_case/test_hospital.py
+19
-0
__init__.py
test_backend_case/visual_beauty_card_case/__init__.py
+0
-0
test_beautycard_filters.py
...d_case/visual_beauty_card_case/test_beautycard_filters.py
+22
-0
test_beautycard_skus.py
...kend_case/visual_beauty_card_case/test_beautycard_skus.py
+20
-0
test_visual_beauty_card_services.py
...sual_beauty_card_case/test_visual_beauty_card_services.py
+20
-0
detail_messageid.yaml
test_backend_data/conversation_data/detail_messageid.yaml
+8
-0
__init__.py
test_backend_data/filter_data/__init__.py
+0
-0
service_home_city_v2.yaml
test_backend_data/filter_data/service_home_city_v2.yaml
+14
-0
hospital.yaml
test_backend_data/search_data/hospital.yaml
+17
-0
__init__.py
test_backend_data/visual_beauty_card_data/__init__.py
+0
-0
beautycard_filters.yaml
...kend_data/visual_beauty_card_data/beautycard_filters.yaml
+17
-0
beautycard_skus.yaml
...backend_data/visual_beauty_card_data/beautycard_skus.yaml
+110
-0
visual_beauty_card_services.yaml
.../visual_beauty_card_data/visual_beauty_card_services.yaml
+21
-0
test_conversation.py
test_doctor_case/web_case/test_conversation.py
+22
-0
test_conversation_coupon.py
test_doctor_case/web_case/test_conversation_coupon.py
+20
-0
test_conversation_diary.py
test_doctor_case/web_case/test_conversation_diary.py
+22
-0
test_conversation_unread_list.py
test_doctor_case/web_case/test_conversation_unread_list.py
+22
-0
test_service.py
test_doctor_case/web_case/test_service.py
+22
-0
conversation.yaml
test_doctor_data/web_data/conversation.yaml
+8
-0
conversation_coupon.yaml
test_doctor_data/web_data/conversation_coupon.yaml
+12
-0
conversation_diary.yaml
test_doctor_data/web_data/conversation_diary.yaml
+6
-0
conversation_unread_list.yaml
test_doctor_data/web_data/conversation_unread_list.yaml
+7
-0
service.yaml
test_doctor_data/web_data/service.yaml
+7
-0
No files found.
all_backend_api/conversation_request.py
View file @
74792e9c
...
...
@@ -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
))
...
...
all_backend_api/conversation_request.yaml
View file @
74792e9c
...
...
@@ -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
#需要登录的接口
all_backend_api/filter_request.py
0 → 100644
View file @
74792e9c
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"
)
all_backend_api/filter_request.yaml
0 → 100644
View file @
74792e9c
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
:
{}
all_backend_api/search_request.py
View file @
74792e9c
...
...
@@ -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"
))
all_backend_api/search_request.yaml
View file @
74792e9c
...
...
@@ -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
all_backend_api/visual_beauty_card.py
0 → 100644
View file @
74792e9c
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
all_backend_api/visual_beauty_card.yaml
0 → 100644
View file @
74792e9c
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
:
{}
all_doctor_api/web_request.py
View file @
74792e9c
...
...
@@ -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
))
all_doctor_api/web_request.yaml
View file @
74792e9c
...
...
@@ -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
#需要登录
host.yaml
View file @
74792e9c
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
path_setting.py
View file @
74792e9c
...
...
@@ -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"
)
...
...
test_backend_case/conversation_case/test_detail_messageid.py
0 → 100644
View file @
74792e9c
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"
]
test_backend_case/filter_case/__init__.py
0 → 100644
View file @
74792e9c
test_backend_case/filter_case/test_service_home_city_v2.py
0 → 100644
View file @
74792e9c
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
test_backend_case/search_case/test_hospital.py
0 → 100644
View file @
74792e9c
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"
]
test_backend_case/visual_beauty_card_case/__init__.py
0 → 100644
View file @
74792e9c
test_backend_case/visual_beauty_card_case/test_beautycard_filters.py
0 → 100644
View file @
74792e9c
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
test_backend_case/visual_beauty_card_case/test_beautycard_skus.py
0 → 100644
View file @
74792e9c
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
test_backend_case/visual_beauty_card_case/test_visual_beauty_card_services.py
0 → 100644
View file @
74792e9c
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
test_backend_data/conversation_data/detail_messageid.yaml
0 → 100644
View file @
74792e9c
detail_messageid
:
#验证成功case
-
case
:
"
私信详情页最新一页的消息内容"
os_version
:
10
last_msg_id
:
0
offset_msg_id
:
0
assert
:
20
test_backend_data/filter_data/__init__.py
0 → 100644
View file @
74792e9c
test_backend_data/filter_data/service_home_city_v2.yaml
0 → 100644
View file @
74792e9c
#城市筛选器
service_home_city_v2
:
-
case
:
"
城市筛选器接口"
current_city_id
:
"
"
lat
:
"
40.002"
lng
:
"
116.487252"
assert
:
0
test_backend_data/search_data/hospital.yaml
0 → 100644
View file @
74792e9c
hospital
:
#品类聚合页医生tab
-
case
:
"
品类聚合页面医生tab"
assert
:
null
cp_id
:
82
tag_id
:
[]
q
:
"
眼部整形"
count
:
10
device_id
:
869378034450718
test_backend_data/visual_beauty_card_data/__init__.py
0 → 100644
View file @
74792e9c
test_backend_data/visual_beauty_card_data/beautycard_filters.yaml
0 → 100644
View file @
74792e9c
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
test_backend_data/visual_beauty_card_data/beautycard_skus.yaml
0 → 100644
View file @
74792e9c
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
test_backend_data/visual_beauty_card_data/visual_beauty_card_services.yaml
0 → 100644
View file @
74792e9c
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
test_doctor_case/web_case/test_conversation.py
0 → 100644
View file @
74792e9c
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"
]
test_doctor_case/web_case/test_conversation_coupon.py
0 → 100644
View file @
74792e9c
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"
]
test_doctor_case/web_case/test_conversation_diary.py
0 → 100644
View file @
74792e9c
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"
]
test_doctor_case/web_case/test_conversation_unread_list.py
0 → 100644
View file @
74792e9c
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"
]
test_doctor_case/web_case/test_service.py
0 → 100644
View file @
74792e9c
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"
]
test_doctor_data/web_data/conversation.yaml
0 → 100644
View file @
74792e9c
conversation
:
#全部私信case
-
case
:
"
请求成功,有数据返回的第一页数据"
is_star
:
0
page
:
1
assert_size
:
10
assert
:
10
test_doctor_data/web_data/conversation_coupon.yaml
0 → 100644
View file @
74792e9c
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
test_doctor_data/web_data/conversation_diary.yaml
0 → 100644
View file @
74792e9c
conversation_diary
:
#私信点击发送案例case
-
case
:
"
点击私信发送案例按钮"
doctor_user_id
:
602329
assert
:
0
test_doctor_data/web_data/conversation_unread_list.yaml
0 → 100644
View file @
74792e9c
conversation_unread_list
:
#未读私信case
-
case
:
"
请求成功,有未读消息"
page
:
1
assert_size
:
10
assert
:
10
test_doctor_data/web_data/service.yaml
0 → 100644
View file @
74792e9c
service
:
#私信点击发送商品case
-
case
:
"
点击私信发送商品按钮"
#page: 1
assert_size
:
10
assert
:
10
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment