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
b499cb4e
Commit
b499cb4e
authored
Aug 20, 2021
by
张伟男
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' into zwn_dev
parents
16280871
3c468449
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
276 additions
and
55 deletions
+276
-55
filter_request.py
all_backend_api/filter_request.py
+1
-3
visual_beauty_card.py
all_backend_api/visual_beauty_card.py
+3
-3
web3_request.py
all_doctor_api/web3_request.py
+8
-0
web3_request.yaml
all_doctor_api/web3_request.yaml
+11
-0
path_setting.py
path_setting.py
+1
-0
test_service_home_city_v2.py
test_backend_case/filter_case/test_service_home_city_v2.py
+8
-5
test_beautycard_filters.py
...d_case/visual_beauty_card_case/test_beautycard_filters.py
+10
-7
test_beautycard_skus.py
...kend_case/visual_beauty_card_case/test_beautycard_skus.py
+17
-5
test_visual_beauty_card_services.py
...sual_beauty_card_case/test_visual_beauty_card_services.py
+29
-5
service_home_city_v2.yaml
test_backend_data/filter_data/service_home_city_v2.yaml
+14
-3
beautycard_filters.yaml
...kend_data/visual_beauty_card_data/beautycard_filters.yaml
+19
-6
beautycard_skus.yaml
...backend_data/visual_beauty_card_data/beautycard_skus.yaml
+36
-10
visual_beauty_card_services.yaml
.../visual_beauty_card_data/visual_beauty_card_services.yaml
+25
-8
test_conversation_robot_add_message.py
...tor_case/web3_case/test_conversation_robot_add_message.py
+19
-0
conversation_robot_add_message.yaml
...doctor_data/web3_data/conversation_robot_add_message.yaml
+75
-0
No files found.
all_backend_api/filter_request.py
View file @
b499cb4e
...
@@ -8,7 +8,6 @@ class filter_request(BaseRequest):
...
@@ -8,7 +8,6 @@ class filter_request(BaseRequest):
self
.
data
=
self
.
api_load
(
path_setting
.
FILTER_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
FILTER_CONFIG
)
def
service_home_city_v2
(
self
,
current_city_id
,
lat
,
lng
):
def
service_home_city_v2
(
self
,
current_city_id
,
lat
,
lng
):
print
(
"fgx"
)
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"lat"
]
=
lat
self
.
params
[
"lat"
]
=
lat
self
.
params
[
"lng"
]
=
lng
self
.
params
[
"lng"
]
=
lng
...
@@ -16,8 +15,7 @@ class filter_request(BaseRequest):
...
@@ -16,8 +15,7 @@ class filter_request(BaseRequest):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
#城市筛选器
#
城市筛选器
print
(
filter_request
()
.
service_home_city_v2
(
""
,
"40.002"
,
"116.487252"
))
print
(
filter_request
()
.
service_home_city_v2
(
""
,
"40.002"
,
"116.487252"
))
print
(
"fgx"
)
all_backend_api/visual_beauty_card.py
View file @
b499cb4e
...
@@ -10,7 +10,7 @@ class visual_beauty_card_request(BaseRequest):
...
@@ -10,7 +10,7 @@ class visual_beauty_card_request(BaseRequest):
self
.
data
=
self
.
api_load
(
path_setting
.
BEAUTYCARD_FILTERS_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'
):
def
visual_beauty_card_services
(
self
,
unit_id
,
current_city_id
,
page
,
page_size
,
version
):
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"page"
]
=
page
self
.
params
[
"page"
]
=
page
...
@@ -20,7 +20,7 @@ class visual_beauty_card_request(BaseRequest):
...
@@ -20,7 +20,7 @@ class visual_beauty_card_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
'visual_beauty_card_services'
])
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'
):
def
beautycard_filters
(
self
,
unit_id
,
current_city_id
,
version
):
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"version"
]
=
version
self
.
params
[
"version"
]
=
version
...
@@ -28,7 +28,7 @@ class visual_beauty_card_request(BaseRequest):
...
@@ -28,7 +28,7 @@ class visual_beauty_card_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
'beautycard_filters'
])
return
self
.
api_send
(
self
.
data
[
'beautycard_filters'
])
#自定义专题-更美次卡商品列表组件商品
#自定义专题-更美次卡商品列表组件商品
def
beautycard_skus
(
self
,
unit_id
,
tag_id
,
area
,
sort_type
,
page
,
page_size
,
version
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
def
beautycard_skus
(
self
,
unit_id
,
tag_id
,
area
,
sort_type
,
page
,
page_size
,
version
):
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"tag_id"
]
=
tag_id
self
.
params
[
"tag_id"
]
=
tag_id
self
.
params
[
"area"
]
=
area
self
.
params
[
"area"
]
=
area
...
...
all_doctor_api/web3_request.py
View file @
b499cb4e
...
@@ -7,8 +7,16 @@ class web3_request(BaseRequest):
...
@@ -7,8 +7,16 @@ class web3_request(BaseRequest):
self
.
CONVERSATION_ROBOT
=
self
.
api_load
(
path_setting
.
CONVERSATION_ROBOT
)
self
.
CONVERSATION_ROBOT
=
self
.
api_load
(
path_setting
.
CONVERSATION_ROBOT
)
def
conversation_robot_get_page
(
self
):
def
conversation_robot_get_page
(
self
):
#获取页面类型
return
self
.
api_send
(
self
.
CONVERSATION_ROBOT
[
"conversation_robot_get_page"
])
return
self
.
api_send
(
self
.
CONVERSATION_ROBOT
[
"conversation_robot_get_page"
])
def
conversation_robot_add_message
(
self
,
message
,
csrfmiddlewaretoken
):
#添加私信机器人配置
self
.
params
[
"message"
]
=
message
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
return
self
.
api_send
(
self
.
CONVERSATION_ROBOT
[
"conversation_robot_add_message"
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
print
(
web3_request
()
.
conversation_robot_get_page
())
print
(
web3_request
()
.
conversation_robot_get_page
())
print
(
web3_request
()
.
conversation_robot_add_message
(
'{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"测试"}]}],"personality":[]}'
,
"qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
))
all_doctor_api/web3_request.yaml
View file @
b499cb4e
...
@@ -6,3 +6,13 @@ conversation_robot_get_page:
...
@@ -6,3 +6,13 @@ conversation_robot_get_page:
data
:
{}
data
:
{}
json
:
{}
json
:
{}
isLogin
:
1
#需要登录
isLogin
:
1
#需要登录
conversation_robot_add_message
:
method
:
post
url
:
/api/web3/conversation/robot/add_message
params
:
{}
data
:
message
:
${message}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
path_setting.py
View file @
b499cb4e
...
@@ -504,6 +504,7 @@ CONVERSATIONUSERID=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_dat
...
@@ -504,6 +504,7 @@ CONVERSATIONUSERID=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_dat
#医生后台-私信机器人
#医生后台-私信机器人
CONVERSATION_ROBOT
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web3_request.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"
)
ROBOTGETPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web3_data"
,
"conversation_robot_get_page.yaml"
)
ROBOTADDMESSAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web3_data"
,
"conversation_robot_add_message.yaml"
)
#医生后台-服务资源
#医生后台-服务资源
...
...
test_backend_case/filter_case/test_service_home_city_v2.py
View file @
b499cb4e
...
@@ -8,12 +8,15 @@ from all_backend_api.filter_request import filter_request
...
@@ -8,12 +8,15 @@ from all_backend_api.filter_request import filter_request
class
TestServiceHomeCityV2
:
class
TestServiceHomeCityV2
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FILTER
)
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FILTER
)
service
homecityv2_case
,
servicehomecity
v2_data
=
get_ids
(
data
,
"service_home_city_v2"
)
service
_home_city_v2_case
,
service_home_city_
v2_data
=
get_ids
(
data
,
"service_home_city_v2"
)
@pytest.mark.parametrize
(
"param"
,
service
homecityv2_data
,
ids
=
servicehomecity
v2_case
)
@pytest.mark.parametrize
(
"param"
,
service
_home_city_v2_data
,
ids
=
service_home_city_
v2_case
)
def
test_service_home_city_v2
(
self
,
param
):
def
test_service_home_city_v2
(
self
,
param
):
r
=
filter_request
()
.
service_home_city_v2
(
param
[
"current_city_id"
],
param
[
"lat"
],
param
[
"lng"
])
r
=
filter_request
()
.
service_home_city_v2
(
param
[
"current_city_id"
],
param
[
"lat"
],
param
[
"lng"
])
# print('feng=', r)
if
r
[
"error"
]
==
0
:
if
param
[
"current_city_id"
]
==
"worldwide"
:
assert
len
(
r
[
"data"
][
"area"
])
>
0
assert
r
[
"error"
]
==
param
[
"assert_worldwide"
]
if
param
[
"lat"
]
==
"39.98316321398558"
and
param
[
"lng"
]
==
"116.4881236681604"
:
assert
r
[
"data"
][
"recommend"
][
"located"
][
0
][
"id"
]
==
param
[
"assert_beijing"
]
if
param
[
"lat"
]
==
"45.742347"
and
param
[
"lng"
]
==
"126.661669"
:
assert
r
[
"data"
][
"recommend"
][
"located"
][
0
][
"id"
]
==
param
[
"assert_haerbin"
]
test_backend_case/visual_beauty_card_case/test_beautycard_filters.py
View file @
b499cb4e
...
@@ -12,10 +12,14 @@ class TestBeautyCardFilters:
...
@@ -12,10 +12,14 @@ class TestBeautyCardFilters:
@pytest.mark.parametrize
(
"param"
,
beautycard_filters_data
,
ids
=
beautycard_filters_case
)
@pytest.mark.parametrize
(
"param"
,
beautycard_filters_data
,
ids
=
beautycard_filters_case
)
def
test_beautycard_filters
(
self
,
param
):
def
test_beautycard_filters
(
self
,
param
):
print
(
'次卡商品列表筛选器'
)
r
=
visual_beauty_card_request
()
.
beautycard_filters
(
param
[
"unit_id"
],
param
[
"current_city_id"
],
param
[
"version"
])
r
=
visual_beauty_card_request
()
.
beautycard_filters
(
param
[
"unit_id"
],
param
[
"current_city_id"
],
param
[
"version"
])
if
r
[
"data"
]:
if
param
[
"unit_id"
]
==
"20109"
:
print
(
'次卡商品列表筛选器下拉列表有值'
)
assert
len
(
r
[
"data"
])
>
param
[
"assert_spu"
]
assert
len
(
r
[
"data"
][
"field"
])
!=
param
[
"assert"
]
assert
len
(
r
[
"data"
][
"field"
])
is
not
None
assert
len
(
r
[
"data"
][
"areas"
])
!=
param
[
"assert"
]
assert
len
(
r
[
"data"
][
"areas"
])
is
not
None
assert
len
(
r
[
"data"
][
"order"
])
!=
param
[
"assert"
]
assert
len
(
r
[
"data"
][
"order"
])
is
not
None
\ No newline at end of file
if
param
[
"unit_id"
]
==
"20113"
:
assert
len
(
r
[
"data"
])
>
param
[
"assert_sku"
]
assert
len
(
r
[
"data"
][
"field"
])
is
not
None
assert
len
(
r
[
"data"
][
"areas"
])
is
not
None
assert
len
(
r
[
"data"
][
"order"
])
is
not
None
test_backend_case/visual_beauty_card_case/test_beautycard_skus.py
View file @
b499cb4e
...
@@ -12,12 +12,24 @@ class TestBeautyCardSkus:
...
@@ -12,12 +12,24 @@ class TestBeautyCardSkus:
@pytest.mark.parametrize
(
"param"
,
beautycard_skus_data
,
ids
=
beautycard_skus_case
)
@pytest.mark.parametrize
(
"param"
,
beautycard_skus_data
,
ids
=
beautycard_skus_case
)
def
test_beautycard_skus
(
self
,
param
):
def
test_beautycard_skus
(
self
,
param
):
print
(
'次卡商品列表组件商品'
)
r
=
visual_beauty_card_request
()
.
beautycard_skus
(
param
[
"unit_id"
],
param
[
"tag_id"
],
param
[
"area"
],
r
=
visual_beauty_card_request
()
.
beautycard_skus
(
param
[
"unit_id"
],
param
[
"tag_id"
],
param
[
"area"
],
param
[
"sort_type"
],
param
[
"page"
],
param
[
"page_size"
],
param
[
"version"
])
param
[
"sort_type"
],
param
[
"page"
],
param
[
"page_size"
],
if
r
[
"data"
]:
param
[
"version"
])
print
(
'次卡商品列表组件有商品召回'
)
if
r
[
"error"
]
==
0
:
assert
len
(
r
[
"data"
][
"beautycards"
])
!=
param
[
"assert"
]
assert
len
(
r
[
"data"
][
"beautycards"
])
>
param
[
"assert"
]
assert
r
[
"message"
]
==
param
[
"assert_message"
]
assert
r
[
"message"
]
==
param
[
"assert_message"
]
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_image"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_origin_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_gengmei_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"sales_amount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"gm_url"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"rank"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"has_discount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_discount_total_payment"
]
is
not
None
else
:
else
:
assert
r
[
"message"
]
==
param
[
"assert_message"
]
assert
r
[
"message"
]
==
param
[
"assert_message"
]
print
(
'接口出错了'
)
print
(
'接口出错了'
)
test_backend_case/visual_beauty_card_case/test_visual_beauty_card_services.py
View file @
b499cb4e
...
@@ -12,8 +12,32 @@ class TestVisualBeautyCardServices:
...
@@ -12,8 +12,32 @@ class TestVisualBeautyCardServices:
@pytest.mark.parametrize
(
"param"
,
visual_beauty_card_services_data
,
ids
=
visual_beauty_card_services_case
)
@pytest.mark.parametrize
(
"param"
,
visual_beauty_card_services_data
,
ids
=
visual_beauty_card_services_case
)
def
test_visual_beauty_card_services
(
self
,
param
):
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"
])
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"
]:
if
param
[
"unit_id"
]
==
"20105"
:
print
(
'次卡橱窗有商品'
)
assert
len
(
r
[
"data"
][
"beautycards"
])
>
param
[
"assert_spu"
]
assert
len
(
r
[
"data"
][
"beautycards"
])
!=
param
[
"assert"
]
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_id"
]
is
not
None
\ No newline at end of file
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_image"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_origin_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_gengmei_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"sales_amount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"gm_url"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"rank"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"has_discount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_discount_total_payment"
]
is
not
None
if
param
[
"unit_id"
]
==
"20106"
:
assert
len
(
r
[
"data"
][
"beautycards"
])
>
param
[
"assert_sku"
]
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_image"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_origin_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_gengmei_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"sales_amount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"gm_url"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"rank"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"has_discount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_discount_total_payment"
]
is
not
None
\ No newline at end of file
test_backend_data/filter_data/service_home_city_v2.yaml
View file @
b499cb4e
#城市筛选器
#城市筛选器
service_home_city_v2
:
service_home_city_v2
:
-
-
case
:
"
城市筛选器接口"
case
:
"
城市筛选器接口
-current_city_id为空case-经纬度北京
"
current_city_id
:
"
"
current_city_id
:
"
"
lat
:
"
39.98316321398558"
lng
:
"
116.4881236681604"
assert_beijing
:
"
beijing"
-
case
:
"
城市筛选器接口-current_city_id为空case-经纬度哈尔滨"
current_city_id
:
"
"
lat
:
"
45.742347"
lng
:
"
126.661669"
assert_haerbin
:
"
haerbin"
-
case
:
"
城市筛选器接口-全部城市case"
current_city_id
:
"
worldwide"
lat
:
"
40.002"
lat
:
"
40.002"
lng
:
"
116.487252"
lng
:
"
116.487252"
assert
:
0
assert_worldwide
:
0
...
...
test_backend_data/visual_beauty_card_data/beautycard_filters.yaml
View file @
b499cb4e
...
@@ -4,13 +4,26 @@ beautycard_filters:
...
@@ -4,13 +4,26 @@ beautycard_filters:
case
:
"
更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常"
case
:
"
更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常"
unit_id
:
"
20109"
unit_id
:
"
20109"
current_city_id
:
"
beijing"
current_city_id
:
"
beijing"
version
:
"
743.0"
version
:
"
7.43.0"
assert
:
0
assert_spu
:
0
-
#更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常
case
:
"
更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常"
unit_id
:
"
20109"
current_city_id
:
"
beijing"
version
:
"
7.43.0"
assert_spu
:
0
-
#更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常
case
:
"
更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常"
unit_id
:
"
20113"
current_city_id
:
"
beijing"
version
:
"
7.43.0"
assert_sku
:
0
-
-
#更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常
#更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常
case
:
"
更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常"
case
:
"
更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常"
unit_id
:
"
20113"
unit_id
:
"
20113"
current_city_id
:
"
beijing"
current_city_id
:
"
beijing"
version
:
"
743.0"
version
:
"
7.43.0"
assert
:
0
assert_sku
:
0
\ No newline at end of file
\ No newline at end of file
test_backend_data/visual_beauty_card_data/beautycard_skus.yaml
View file @
b499cb4e
...
@@ -8,7 +8,7 @@ beautycard_skus:
...
@@ -8,7 +8,7 @@ beautycard_skus:
sort_type
:
"
0"
sort_type
:
"
0"
page
:
"
0"
page
:
"
0"
page_size
:
"
20"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert
:
0
assert_message
:
"
"
assert_message
:
"
"
...
@@ -21,7 +21,7 @@ beautycard_skus:
...
@@ -21,7 +21,7 @@ beautycard_skus:
sort_type
:
"
0"
sort_type
:
"
0"
page
:
"
0"
page
:
"
0"
page_size
:
"
20"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert
:
0
assert_message
:
"
"
assert_message
:
"
"
...
@@ -34,7 +34,7 @@ beautycard_skus:
...
@@ -34,7 +34,7 @@ beautycard_skus:
sort_type
:
"
2"
sort_type
:
"
2"
page
:
"
0"
page
:
"
0"
page_size
:
"
20"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert
:
0
assert_message
:
"
"
assert_message
:
"
"
...
@@ -47,7 +47,7 @@ beautycard_skus:
...
@@ -47,7 +47,7 @@ beautycard_skus:
sort_type
:
"
2"
sort_type
:
"
2"
page
:
"
0"
page
:
"
0"
page_size
:
"
20"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert
:
0
assert_message
:
"
"
assert_message
:
"
"
...
@@ -60,7 +60,7 @@ beautycard_skus:
...
@@ -60,7 +60,7 @@ beautycard_skus:
sort_type
:
"
1"
sort_type
:
"
1"
page
:
"
0"
page
:
"
0"
page_size
:
"
20"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert
:
0
assert_message
:
"
"
assert_message
:
"
"
...
@@ -73,7 +73,7 @@ beautycard_skus:
...
@@ -73,7 +73,7 @@ beautycard_skus:
sort_type
:
"
1"
sort_type
:
"
1"
page
:
"
0"
page
:
"
0"
page_size
:
"
20"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert
:
0
assert_message
:
"
"
assert_message
:
"
"
...
@@ -86,7 +86,7 @@ beautycard_skus:
...
@@ -86,7 +86,7 @@ beautycard_skus:
sort_type
:
"
3"
sort_type
:
"
3"
page
:
"
0"
page
:
"
0"
page_size
:
"
20"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert
:
0
assert_message
:
"
"
assert_message
:
"
"
...
@@ -99,7 +99,7 @@ beautycard_skus:
...
@@ -99,7 +99,7 @@ beautycard_skus:
sort_type
:
"
3"
sort_type
:
"
3"
page
:
"
0"
page
:
"
0"
page_size
:
"
20"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert
:
0
assert_message
:
"
"
assert_message
:
"
"
...
@@ -112,7 +112,7 @@ beautycard_skus:
...
@@ -112,7 +112,7 @@ beautycard_skus:
sort_type
:
"
2"
sort_type
:
"
2"
page
:
"
0"
page
:
"
0"
page_size
:
"
20"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert
:
0
assert_message
:
"
"
assert_message
:
"
"
...
@@ -125,6 +125,32 @@ beautycard_skus:
...
@@ -125,6 +125,32 @@ beautycard_skus:
sort_type
:
"
1"
sort_type
:
"
1"
page
:
"
0"
page
:
"
0"
page_size
:
"
20"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7.47.0"
assert
:
0
assert_message
:
"
"
-
#更美次卡商品列表组件商品-按SPU导入,接口返回字段正常case
case
:
"
更美次卡商品列表组件商品-按SPU导入,接口返回字段正常case"
unit_id
:
"
20109"
tag_id
:
"
-1"
area
:
"
worldwide"
sort_type
:
"
0"
page
:
"
0"
page_size
:
"
20"
version
:
"
7.47.0"
assert
:
0
assert_message
:
"
"
-
#更美次卡商品列表组件商品-按SKU导入,接口返回字段正常case
case
:
"
更美次卡商品列表组件商品-按SKU导入,接口返回字段正常case"
unit_id
:
"
20113"
tag_id
:
"
-1"
area
:
"
worldwide"
sort_type
:
"
0"
page
:
"
0"
page_size
:
"
20"
version
:
"
7.47.0"
assert
:
0
assert
:
0
assert_message
:
"
"
assert_message
:
"
"
test_backend_data/visual_beauty_card_data/visual_beauty_card_services.yaml
View file @
b499cb4e
visual_beauty_card_services
:
visual_beauty_card_services
:
-
-
#更美次卡橱窗-按SPU导入,定位北京,商品正常召回
#更美次卡橱窗-按SPU导入,定位北京,商品正常召回
case
:
"
更美次卡橱窗-按SPU导入,定位北京,商品正常召回"
case
:
"
更美次卡橱窗-按SPU导入,定位北京,商品正常召回
case
"
unit_id
:
"
20105"
unit_id
:
"
20105"
current_city_id
:
"
beijing"
current_city_id
:
"
beijing"
page
:
"
0"
page
:
"
0"
page_size
:
"
50"
page_size
:
"
50"
version
:
"
743.0"
version
:
"
7.43.0"
assert
:
0
assert_spu
:
0
-
#更美次卡橱窗-按SPU导入,定位北京,接口字段返回正常
case
:
"
更美次卡橱窗-按SPU导入,定位北京,接口字段返回正常case"
unit_id
:
"
20105"
current_city_id
:
"
beijing"
page
:
"
0"
page_size
:
"
50"
version
:
"
7.43.0"
assert_spu
:
0
-
-
#更美次卡橱窗-按SKU导入,定位北京,商品正常召回
#更美次卡橱窗-按SKU导入,定位北京,商品正常召回
case
:
"
更美次卡橱窗-按SKU导入,定位北京,商品正常召回"
case
:
"
更美次卡橱窗-按SKU导入,定位北京,商品正常召回case"
unit_id
:
"
20106"
current_city_id
:
"
beijing"
page
:
"
0"
page_size
:
"
50"
version
:
"
7.43.0"
assert_sku
:
0
-
#更美次卡橱窗-按SKU导入,定位北京,接口字段返回正常
case
:
"
更美次卡橱窗-按SKU导入,定位北京,接口字段返回正常case"
unit_id
:
"
20106"
unit_id
:
"
20106"
current_city_id
:
"
beijing"
current_city_id
:
"
beijing"
page
:
"
0"
page
:
"
0"
page_size
:
"
50"
page_size
:
"
50"
version
:
"
743.0"
version
:
"
7.43.0"
assert
:
0
assert_sku
:
0
\ No newline at end of file
\ No newline at end of file
test_doctor_case/web3_case/test_conversation_robot_add_message.py
0 → 100644
View file @
b499cb4e
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
TestConversationRobotAddMessage
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ROBOTADDMESSAGE
)
robot_add_message_case
,
robot_add_message_data
=
get_ids
(
data
,
"conversation_robot_add_message"
)
@pytest.mark.parametrize
(
"param"
,
robot_add_message_data
,
ids
=
robot_add_message_case
)
def
test_conversation_robot_add_message
(
self
,
param
):
'''私信机器人-添加私信配置'''
r
=
web3_request
()
.
conversation_robot_add_message
(
param
[
"message"
],
param
[
"csrfmiddlewaretoken"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"message"
]
==
param
[
"assert"
]
test_doctor_data/web3_data/conversation_robot_add_message.yaml
0 → 100644
View file @
b499cb4e
conversation_robot_add_message
:
#私信机器人-添加私信配置
-
case
:
"
私信机器人-只填写默认配置-文本"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"测试"}]}],"personality":[]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-只填写默认配置-图片"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"2","content":"https://heras.igengmei.com/service/2021/08/19/55aba3145e"}]}],"personality":[]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-只填写默认配置-优惠券"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"9","content":"59055,51"}]}],"personality":[]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-只填写默认配置-文本+图片"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置的文本"},{"id":"","type":"2","content":"https://heras.igengmei.com/service/2021/08/19/287ca8f095"}]}],"personality":[]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-只填写默认配置-文本+优惠券"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置的文本"},{"id":"","type":"9","content":"59055,51"}]}],"personality":[]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-只填写默认配置-文本+图片+优惠券"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"},{"id":"","type":"2","content":"https://heras.igengmei.com/service/2021/08/20/1e03212794"},{"id":"","type":"9","content":"59055,51"}]}],"personality":[]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-只填写默认配置-图片+优惠券"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"2","content":"https://heras.igengmei.com/service/2021/08/19/a3e25ac9e7"},{"id":"","type":"9","content":"59055,51"}]}],"personality":[]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-只填写默认配置-配置5条"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"2","content":"https://heras.igengmei.com/service/2021/08/19/a3e25ac9e7"},{"id":"","type":"9","content":"59055,51"},{"id":"","type":"0","content":"这是默认配置文本"},{"id":"","type":"0","content":"这是文本"},{"id":"","type":"2","content":"https://heras.igengmei.com/service/2021/08/19/36850a11c5"}]}],"personality":[]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-只填写默认配置-敏感词"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是敏感词呀微信"}]}],"personality":[]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
默认配置不能为空且文本不能含有敏感词,敏感词示例:私聊、微信、私信等"
-
case
:
"
私信机器人-默认配置文本+个性配置机构文本"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"}]}],"personality":[{"name":"机构主页","page_type":"2","tag_id":"","doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"这是机构主页文案"}]}]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-默认配置文本+个性配置医生文本"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"}]}],"personality":[{"name":"医生主页","page_type":"3","tag_id":"","doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"这是医生主页文案"}]}]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-默认配置文本+个性配置商详页眼科-文本"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"}]}],"personality":[{"name":"商详页","page_type":"1","tag_id":12711,"doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"这是商详页文案"}]}]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
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