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
804a15b2
Commit
804a15b2
authored
Aug 13, 2021
by
张慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商祥页-推荐商品列表-新接口-748以上
parent
1dac21fd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
113 additions
and
37 deletions
+113
-37
janus_request.py
all_backend_api/janus_request.py
+45
-37
janus_request.yaml
all_backend_api/janus_request.yaml
+15
-0
path_setting.py
path_setting.py
+2
-0
test_service_promotion_related_service_data.py
...janus_case/test_service_promotion_related_service_data.py
+30
-0
service_promotion_related_service_data.yaml
...ta/janus_data/service_promotion_related_service_data.yaml
+21
-0
No files found.
all_backend_api/janus_request.py
View file @
804a15b2
...
...
@@ -89,6 +89,13 @@ class janus_request(BaseRequest):
self
.
params
[
"tab_id"
]
=
tab_id
return
self
.
api_send
(
self
.
data
[
"product_coupon_my_list"
])
# 商祥页-商品推荐-新接口-748以上
def
service_promotion_related_service_data
(
self
,
service_id
,
page
,
current_city_id
):
self
.
params
[
"service_id"
]
=
service_id
self
.
params
[
"page"
]
=
page
self
.
params
[
"current_city_id"
]
=
current_city_id
return
self
.
api_send
(
self
.
data
[
"service_promotion_related_service_data"
])
# 品类聚合页面商品列表
def
tag_service
(
self
,
size
,
tag_ids
,
offset
,
tag_id
,
version
,
device_id
):
print
(
"fgx"
)
...
...
@@ -296,33 +303,33 @@ if __name__ == '__main__':
#打印购物车-猜你喜欢列表接口返回
# print(janus_request().mine_guess_you_like())
#打印商祥页-详情接口返回
print
(
janus_request
()
.
product_detail
(
"5857263"
,
"618788"
,
"7.43.0"
))
#打印商祥页-sku信息接口返回
print
(
janus_request
()
.
sku_info
(
"5857263"
,
"618788"
))
#打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回
print
(
janus_request
()
.
product_coupon_my_list
(
0
,
0
))
#品类聚合页面商品列表接口返回
# print(janus_request().tag_service())
print
(
"fgx"
)
#品类聚合页面标签和专场
# print(janus_request().polymer())
print
(
"fgx"
)
#打印次卡-确认订单接口返回
print
(
janus_request
()
.
beauty_card_order_confirm
(
"10176"
,
1
,
1
,
0
))
#打印次卡-确认订单页面-修改手机号接口返回
print
(
janus_request
()
.
beauty_card_update_phone
(
"+8612348543876"
,
1
,
"084430"
))
#打印次卡-提交订单接口返回
print
(
janus_request
()
.
beauty_card_order_submit
(
"12345678912"
,
"10176"
,
1
,
1
,
0
,
0
))
#打印次卡-支付平台接口返回
print
(
janus_request
()
.
beauty_card_payment_method
(
"101670448736595"
))
print
(
janus_request
()
.
product_my_list
(
0
,
0
))
# 次卡商详页-适应机构
print
(
janus_request
()
.
beauty_card_service_hospital
(
"10046"
,
20
,
0
,
1
))
#
print(janus_request().product_detail("5857263", "618788", "7.43.0"))
#
#
打印商祥页-sku信息接口返回
#
print(janus_request().sku_info("5857263", "618788"))
#
#
打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回
#
print(janus_request().product_coupon_my_list(0, 0))
#
#
#
品类聚合页面商品列表接口返回
#
#
print(janus_request().tag_service())
#
print("fgx")
#
#
#
品类聚合页面标签和专场
#
#
print(janus_request().polymer())
#
print("fgx")
#
#
#
打印次卡-确认订单接口返回
#
print(janus_request().beauty_card_order_confirm("10176", 1, 1, 0))
#
#
打印次卡-确认订单页面-修改手机号接口返回
#
print(janus_request().beauty_card_update_phone("+8612348543876", 1, "084430"))
#
#
打印次卡-提交订单接口返回
#
print(janus_request().beauty_card_order_submit("12345678912", "10176", 1, 1, 0, 0))
#
#
打印次卡-支付平台接口返回
#
print(janus_request().beauty_card_payment_method("101670448736595"))
#
#
print(janus_request().product_my_list(0, 0))
#
#
#
次卡商详页-适应机构
#
print(janus_request().beauty_card_service_hospital("10046", 20, 0, 1))
# #打印购物车-猜你喜欢列表接口返回
# print(janus_request().mine_guess_you_like())
# #打印商祥页-详情接口返回
...
...
@@ -366,13 +373,14 @@ if __name__ == '__main__':
# #直播-点击【设置封面】
# print("直播-点击【设置封面】")
# print(janus_request().page_rules("744.2", "beijing", "post_add_pic"))
#直播-点击【设置封面】
print
(
"直播-点击【设置封面】"
)
print
(
janus_request
()
.
page_rules
(
"744.2"
,
"beijing"
,
"post_add_pic"
))
#直播-主播获取美颜
print
(
"meiyan"
)
print
(
janus_request
()
.
beauty
(
"739"
))
#直播-主播修改美颜
print
(
"change meiyan"
)
print
(
janus_request
()
.
beauty_post
(
"739"
,
"true"
,
"0.60"
,
"0.40"
,
"0.70"
))
# #直播-点击【设置封面】
# print("直播-点击【设置封面】")
# print(janus_request().page_rules("744.2", "beijing", "post_add_pic"))
# #直播-主播获取美颜
# print("meiyan")
# print(janus_request().beauty("739"))
# #直播-主播修改美颜
# print("change meiyan")
# print(janus_request().beauty_post("739","true","0.60","0.40","0.70"))
# 商祥页-推荐商品-新接口
print
(
janus_request
()
.
service_promotion_related_service_data
(
'5828374'
,
1
,
'beijing'
))
all_backend_api/janus_request.yaml
View file @
804a15b2
...
...
@@ -69,6 +69,21 @@ product_coupon_my_list:
json
:
{}
isLogin
:
1
#商祥页-推荐商品-新接口-748以上
service_promotion_related_service_data
:
method
:
get
url
:
/api/janus/service/promotion/related_service/_data
params
:
service_id
:
${service_id}
page
:
${page}
current_city_id
:
${current_city_id}
version
:
"
7.48.0"
lat
:
"
39.983161"
lng
:
"
116.488078"
data
:
{}
json
:
{}
isLogin
:
1
#品类聚合页面商品列表的
tag_service
:
method
:
GET
...
...
path_setting.py
View file @
804a15b2
...
...
@@ -369,6 +369,8 @@ PRODUCT_COUPON_MY_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/
#商祥页-推荐商品列表
HYBRID_PROMOTION_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hybrid_promotion_request.yaml"
)
RELATED_SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_promotion_data"
,
"related_service_data.yaml"
)
# 商祥页-推荐商品列表-新接口-748以上
SERVICE_PROMOTION_RELATED_SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"service_promotion_related_service_data.yaml"
)
#次卡-确认订单
BEAUTY_CARD_ORDER_CONFIRM
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_order_confirm.yaml"
)
...
...
test_backend_case/janus_case/test_service_promotion_related_service_data.py
0 → 100644
View file @
804a15b2
import
pytest
from
all_backend_api.janus_request
import
janus_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestServicePromotionRelatedServiceData
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE_PROMOTION_RELATED_SERVICE_DATA
)
service_promotion_related_service_data_case
,
service_promotion_related_service_data_data
=
\
get_ids
(
data
,
"service_promotion_related_service_data"
)
@pytest.mark.parametrize
(
"param"
,
service_promotion_related_service_data_data
,
ids
=
service_promotion_related_service_data_case
)
def
test_service_promotion_related_service_data_case
(
self
,
param
):
r
=
janus_request
()
.
service_promotion_related_service_data
(
param
[
"service_id"
],
param
[
"page"
],
param
[
"current_city_id"
])
if
param
[
"page"
]
==
1
:
assert
len
(
r
[
"data"
][
"services"
])
==
param
[
"assert_page1_len"
]
if
param
[
"page"
]
==
2
:
assert
len
(
r
[
"data"
][
"services"
])
==
param
[
"assert_page2_len"
]
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"services"
][
0
][
"title"
]
is
not
None
assert
r
[
"data"
][
"services"
][
0
][
"price_info"
]
is
not
None
assert
r
[
"data"
][
"services"
][
0
][
"sell_num_desc"
]
is
not
None
assert
r
[
"data"
][
"services"
][
0
][
"doctor_hospital_name"
]
is
not
None
assert
r
[
"data"
][
"services"
][
0
][
"distance"
]
is
not
None
test_backend_data/janus_data/service_promotion_related_service_data.yaml
0 → 100644
View file @
804a15b2
service_promotion_related_service_data
:
-
case
:
"
校验第一页返回数据2条case"
service_id
:
"
5828374"
page
:
1
current_city_id
:
"
beijing"
assert_page1_len
:
2
-
case
:
"
校验第二页返回数据10条case"
service_id
:
"
5828374"
page
:
2
current_city_id
:
"
beijing"
assert_page2_len
:
10
-
case
:
"
校验必要字段接口返回不为空"
service_id
:
"
5828374"
page
:
2
current_city_id
:
"
beijing"
assert_page1_len
:
2
assert_page2_len
:
10
\ No newline at end of file
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