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
588e153f
Commit
588e153f
authored
Jul 23, 2021
by
张慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
次卡商祥页-适用机构列表接口case完善
parent
c000a00b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
90 deletions
+96
-90
janus_request.py
all_backend_api/janus_request.py
+39
-45
janus_request.yaml
all_backend_api/janus_request.yaml
+3
-6
path_setting.py
path_setting.py
+1
-3
test_beauty_card_service_hospital.py
...kend_case/janus_case/test_beauty_card_service_hospital.py
+23
-0
test_service_hospital.py
test_backend_case/janus_case/test_service_hospital.py
+0
-18
beauty_card_service_hospital.yaml
...backend_data/janus_data/beauty_card_service_hospital.yaml
+30
-0
service_hospital.yaml
test_backend_data/janus_data/service_hospital.yaml
+0
-18
No files found.
all_backend_api/janus_request.py
View file @
588e153f
...
@@ -19,9 +19,6 @@ class janus_request(BaseRequest):
...
@@ -19,9 +19,6 @@ class janus_request(BaseRequest):
#医生医院sug列表
#医生医院sug列表
self
.
data
=
self
.
api_load
(
path_setting
.
KEYWORDTIP_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
KEYWORDTIP_CONFIG
)
#次卡商详页
self
.
data
=
self
.
api_load
(
path_setting
.
BEAUTY_CARD_DETAIL_CONFIG
)
#直播polling循环
#直播polling循环
self
.
data
=
self
.
api_load
(
path_setting
.
POLLING_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
POLLING_CONFIG
)
...
@@ -199,16 +196,13 @@ class janus_request(BaseRequest):
...
@@ -199,16 +196,13 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"beauty_card_detail"
])
return
self
.
api_send
(
self
.
data
[
"beauty_card_detail"
])
# 次卡商详-适应机构列表
# 次卡商详-适应机构列表
def
service_hospital
(
self
,
offset
,
sku_id
,
size
,
version
,
current_city_id
,
lat
,
lng
):
def
beauty_card_service_hospital
(
self
,
sku_id
,
size
,
offset
,
sort_type
):
self
.
params
[
'offset'
]
=
offset
self
.
params
[
'sku_id'
]
=
sku_id
self
.
params
[
'sku_id'
]
=
sku_id
self
.
params
[
'size'
]
=
size
self
.
params
[
'size'
]
=
size
self
.
params
[
'version'
]
=
version
self
.
params
[
'offset'
]
=
offset
self
.
params
[
'current_city_id'
]
=
current_city_id
self
.
params
[
'sort_type'
]
=
sort_type
self
.
params
[
'lat'
]
=
lat
self
.
params
[
'lng'
]
=
lng
return
self
.
api_send
(
self
.
data
[
"service_hospital"
])
return
self
.
api_send
(
self
.
data
[
"
beauty_card_
service_hospital"
])
# 首页(灰度)feed-推荐商品类型tab[除必要参数外其余参数使用默认参数形式方便之后调整]
# 首页(灰度)feed-推荐商品类型tab[除必要参数外其余参数使用默认参数形式方便之后调整]
def
feed_service
(
self
,
tab_value
,
first_load
,
version
=
'7.42.2'
,
device_id
=
'androidid_49973caa1b578d85'
,
current_city_id
=
'beijing'
):
def
feed_service
(
self
,
tab_value
,
first_load
,
version
=
'7.42.2'
,
device_id
=
'androidid_49973caa1b578d85'
,
current_city_id
=
'beijing'
):
...
@@ -238,37 +232,37 @@ class janus_request(BaseRequest):
...
@@ -238,37 +232,37 @@ class janus_request(BaseRequest):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
#打印购物车-猜你喜欢列表接口返回
# #打印购物车-猜你喜欢列表接口返回
print
(
janus_request
()
.
mine_guess_you_like
())
# print(janus_request().mine_guess_you_like())
#打印商祥页-详情接口返回
# #打印商祥页-详情接口返回
print
(
janus_request
()
.
product_detail
(
"5857263"
,
"618788"
,
"7.43.0"
))
# print(janus_request().product_detail("5857263", "618788", "7.43.0"))
#打印商祥页-sku信息接口返回
# #打印商祥页-sku信息接口返回
print
(
janus_request
()
.
sku_info
(
"5857263"
,
"618788"
))
# print(janus_request().sku_info("5857263", "618788"))
#打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回
# #打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回
print
(
janus_request
()
.
product_coupon_my_list
(
0
,
0
))
# print(janus_request().product_coupon_my_list(0, 0))
#
#品类聚合页面商品列表接口返回
# #品类聚合页面商品列表接口返回
print
(
janus_request
()
.
tag_service
())
# print(janus_request().tag_service())
print
(
"fgx"
)
# print("fgx")
#
#品类聚合页面标签和专场
# #品类聚合页面标签和专场
print
(
janus_request
()
.
polymer
())
# print(janus_request().polymer())
print
(
"fgx"
)
# print("fgx")
#
#打印次卡-确认订单接口返回
# #打印次卡-确认订单接口返回
print
(
janus_request
()
.
beauty_card_order_confirm
(
"10176"
,
1
,
1
,
0
))
# 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_update_phone("+8612348543876", 1, "084430"))
#打印次卡-提交订单接口返回
# #打印次卡-提交订单接口返回
print
(
janus_request
()
.
beauty_card_order_submit
(
"12345678912"
,
"10176"
,
1
,
1
,
0
,
0
))
# print(janus_request().beauty_card_order_submit("12345678912", "10176", 1, 1, 0, 0))
#打印次卡-支付平台接口返回
# #打印次卡-支付平台接口返回
print
(
janus_request
()
.
beauty_card_payment_method
(
"101670448736595"
))
# print(janus_request().beauty_card_payment_method("101670448736595"))
#
print
(
janus_request
()
.
product_my_list
(
0
,
0
))
# print(janus_request().product_my_list(0, 0))
# # 次卡商详页
# print(janus_request().beauty_card_detail("100018", "10046", "100018", "7.44.0", "beijing", "40.001879", "116.487194"))
# 次卡商详页-适应机构
# 次卡商详页-适应机构
print
(
janus_request
()
.
beauty_card_detail
(
"100018"
,
"10046"
,
"100018"
,
"7.44.0"
,
"beijing"
,
"40.001879"
,
"116.487194"
))
print
(
janus_request
()
.
beauty_card_service_hospital
(
"10046"
,
20
,
0
,
1
))
# 次卡商详页
print
(
janus_request
()
.
service_hospital
(
"0"
,
"10046"
,
"1"
,
"7.44.0"
,
"beijing"
,
"40.001879"
,
"116.487194"
))
# #打印购物车-猜你喜欢列表接口返回
# #打印购物车-猜你喜欢列表接口返回
# print(janus_request().mine_guess_you_like())
# print(janus_request().mine_guess_you_like())
# #打印商祥页-详情接口返回
# #打印商祥页-详情接口返回
...
@@ -304,12 +298,12 @@ if __name__ == '__main__':
...
@@ -304,12 +298,12 @@ if __name__ == '__main__':
# print(janus_request().beauty_card_payment_delete("101353630959868"))
# print(janus_request().beauty_card_payment_delete("101353630959868"))
# #打印次卡-申请退款接口返回
# #打印次卡-申请退款接口返回
# print(janus_request().beauty_card_refund_info("102217820485006"))
# print(janus_request().beauty_card_refund_info("102217820485006"))
#打印次卡-提交退款申请接口返回
#
#
打印次卡-提交退款申请接口返回
# print(janus_request().beauty_card_refund_submit("102813852173916", 3, "个人身体原因", 0))
# print(janus_request().beauty_card_refund_submit("102813852173916", 3, "个人身体原因", 0))
print
(
janus_request
()
.
beauty_card_order_detail
(
102247770691611
))
#
print(janus_request().beauty_card_order_detail(102247770691611))
# print(janus_request().product_my_list(0, 0))
# print(janus_request().product_my_list(0, 0))
#直播-点击【设置封面】
#
#
直播-点击【设置封面】
print
(
"直播-点击【设置封面】"
)
#
print("直播-点击【设置封面】")
print
(
janus_request
()
.
page_rules
(
"744.2"
,
"beijing"
,
"post_add_pic"
))
#
print(janus_request().page_rules("744.2", "beijing", "post_add_pic"))
all_backend_api/janus_request.yaml
View file @
588e153f
...
@@ -145,17 +145,14 @@ beauty_card_detail:
...
@@ -145,17 +145,14 @@ beauty_card_detail:
#次卡商详页-适应机构列表
#次卡商详页-适应机构列表
service_hospital
:
beauty_card_
service_hospital
:
method
:
GET
method
:
GET
url
:
/api/janus/beauty_card/service_hospital
url
:
/api/janus/beauty_card/service_hospital
params
:
params
:
offset
:
${offset}
sku_id
:
${sku_id}
sku_id
:
${sku_id}
size
:
${size}
size
:
${size}
version
:
${version}
offset
:
${offset}
current_city_id
:
${current_city_id}
sort_type
:
${sort_type}
lat
:
${lat}
lng
:
${lng}
data
:
{
}
data
:
{
}
json
:
{
}
json
:
{
}
...
...
path_setting.py
View file @
588e153f
...
@@ -518,12 +518,10 @@ CHECK_SPU_IDS = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_dat
...
@@ -518,12 +518,10 @@ CHECK_SPU_IDS = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_dat
#次卡商详页
#次卡商详页
BEAUTY_CARD_DETAIL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
BEAUTY_CARD_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_detail.yaml"
)
BEAUTY_CARD_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_detail.yaml"
)
#次卡商详页-适应机构列表
#次卡商详页-适应机构列表
SERVICE_HOSPITAL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
BEAUTY_CARD_SERVICE_HOSPITAL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_service_hospital.yaml"
)
SERVICE_HOSPITAL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"service_hospital.yaml"
)
#免费招募背景图片
#免费招募背景图片
FREE_RECRUIT_BANNER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
FREE_RECRUIT_BANNER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
...
...
test_backend_case/janus_case/test_beauty_card_service_hospital.py
0 → 100644
View file @
588e153f
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.janus_request
import
janus_request
class
TestServiceHospital
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
BEAUTY_CARD_SERVICE_HOSPITAL
)
beauty_card_service_hospital_case
,
beauty_card_service_hospital_data
=
get_ids
(
data
,
"beauty_card_service_hospital"
)
@pytest.mark.parametrize
(
"param"
,
beauty_card_service_hospital_data
,
ids
=
beauty_card_service_hospital_case
)
def
test_beauty_card_service_hospital
(
self
,
param
):
r
=
janus_request
()
.
beauty_card_service_hospital
(
param
[
"sku_id"
],
param
[
"size"
],
param
[
"offset"
],
param
[
"sort_type"
])
if
param
[
"sort_type"
]
==
1
:
#智能排序
assert
len
(
r
[
"data"
][
"service_hospital_list"
])
>
0
if
param
[
"sort_type"
]
==
2
:
#离我最近
assert
len
(
r
[
"data"
][
"service_hospital_list"
])
>
0
if
param
[
"sort_type"
]
==
3
:
#好评优先
assert
len
(
r
[
"data"
][
"service_hospital_list"
])
>
0
test_backend_case/janus_case/test_service_hospital.py
deleted
100644 → 0
View file @
c000a00b
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.janus_request
import
janus_request
class
TestServiceHospital
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE_HOSPITAL
)
service_hospital_case
,
service_hospital_data
=
get_ids
(
data
,
"service_hospital"
)
@pytest.mark.parametrize
(
"param"
,
service_hospital_data
,
ids
=
service_hospital_case
)
def
test_service_hospital
(
self
,
param
):
r
=
janus_request
()
.
service_hospital
(
param
[
"offset"
],
param
[
"sku_id"
],
param
[
"size"
],
param
[
"version"
],
param
[
"current_city_id"
],
param
[
"lat"
],
param
[
"lng"
])
if
r
[
"error"
]
==
0
:
assert
len
(
r
[
"data"
][
"service_hospital_list"
])
>
param
[
"assert"
]
test_backend_data/janus_data/beauty_card_service_hospital.yaml
0 → 100644
View file @
588e153f
beauty_card_service_hospital
:
#次卡商详页-适用机构列表
-
case
:
"
校验次卡适用机构列表接口-智能排序case"
sku_id
:
10046
size
:
20
offset
:
0
sort_type
:
1
assert_error
:
0
-
case
:
"
校验次卡适用机构列表接口-离我最近case"
sku_id
:
10046
size
:
20
offset
:
0
sort_type
:
2
assert_error
:
0
-
case
:
"
校验次卡适用机构列表接口-好评优先case"
sku_id
:
10046
size
:
20
offset
:
0
sort_type
:
3
assert_error
:
0
test_backend_data/janus_data/service_hospital.yaml
deleted
100644 → 0
View file @
c000a00b
service_hospital
:
#次卡商详页-适用机构列表
-
case
:
"
次卡适用机构列表spuid=100018"
assert
:
0
offset
:
0
sku_id
:
10046
size
:
1
version
:
7.44.0
current_city_id
:
beijing
lat
:
40.001879
lng
:
116.487194
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