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
abf4910d
Commit
abf4910d
authored
Jun 11, 2021
by
陈雪
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' of
http://git.wanmeizhensuo.com/dengyingying/backend_auto
into common_dev
parents
72bbe9d9
e9999a6d
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
165 additions
and
0 deletions
+165
-0
hybrid_promotion_request.py
all_backend_api/hybrid_promotion_request.py
+21
-0
hybrid_promotion_request.yaml
all_backend_api/hybrid_promotion_request.yaml
+10
-0
janus_request.py
all_backend_api/janus_request.py
+21
-0
janus_request.yaml
all_backend_api/janus_request.yaml
+25
-0
path_setting.py
path_setting.py
+9
-0
__init__.py
test_backend_case/hybrid_promotion_case/__init__.py
+0
-0
test_related_service_data.py
...d_case/hybrid_promotion_case/test_related_service_data.py
+19
-0
test_beauty_card_confirm.py
test_backend_case/janus_case/test_beauty_card_confirm.py
+19
-0
test_product_coupon_my_list.py
test_backend_case/janus_case/test_product_coupon_my_list.py
+19
-0
__init__.py
test_backend_data/hybrid_promotion_data/__init__.py
+0
-0
related_service_data.yaml
...kend_data/hybrid_promotion_data/related_service_data.yaml
+7
-0
beauty_card_confirm.yaml
test_backend_data/janus_data/beauty_card_confirm.yaml
+8
-0
product_coupon_my_list.yaml
test_backend_data/janus_data/product_coupon_my_list.yaml
+7
-0
No files found.
all_backend_api/hybrid_promotion_request.py
0 → 100644
View file @
abf4910d
import
path_setting
from
in_common.base_request
import
BaseRequest
class
hybrid_promotion_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
HYBRID_PROMOTION_CONFIG
)
#商祥页-sku信息
def
related_service_data
(
self
,
service_id
,
page
):
self
.
params
[
"service_id"
]
=
service_id
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
data
[
"related_service_data"
])
if
__name__
==
'__main__'
:
#打印商祥页-推荐商品列表接口返回
print
(
hybrid_promotion_request
()
.
related_service_data
(
"5815040"
,
1
))
all_backend_api/hybrid_promotion_request.yaml
0 → 100644
View file @
abf4910d
#商祥页-推荐商品列表
related_service_data
:
method
:
get
url
:
/hybrid/promotion/related_service/_data
params
:
service_id
:
${service_id}
page
:
${page}
data
:
{}
json
:
{}
\ No newline at end of file
all_backend_api/janus_request.py
View file @
abf4910d
...
...
@@ -74,6 +74,12 @@ class janus_request(BaseRequest):
self
.
params
[
"service_item_id"
]
=
service_item_id
return
self
.
api_send
(
self
.
data
[
"sku_info"
])
#商祥页-美券列表-我的美券点击-744版本及以后-新接口
def
product_coupon_my_list
(
self
,
start_num
,
tab_id
):
self
.
params
[
"start_num"
]
=
start_num
self
.
params
[
"tab_id"
]
=
tab_id
return
self
.
api_send
(
self
.
data
[
"product_coupon_my_list"
])
# 品类聚合页面商品列表
def
tag_service
(
self
,
size
,
tag_ids
,
offset
,
tag_id
,
version
,
device_id
):
print
(
"fgx"
)
...
...
@@ -104,6 +110,14 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
'keyword_tip'
])
#次卡-确认订单
def
beauty_card_confirm
(
self
,
sku_id
,
number
,
use_bc_coupon
,
bc_coupon_id
):
self
.
params
[
"sku_id"
]
=
sku_id
self
.
params
[
"number"
]
=
number
self
.
params
[
"use_bc_coupon"
]
=
use_bc_coupon
self
.
params
[
"bc_coupon_id"
]
=
bc_coupon_id
return
self
.
api_send
(
self
.
data
[
"beauty_card_confirm"
])
# 新版本我的美券列表
def
product_my_list
(
self
,
start_num
,
tab_id
):
self
.
params
[
'start_num'
]
=
start_num
...
...
@@ -118,6 +132,8 @@ if __name__ == '__main__':
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
())
...
...
@@ -127,4 +143,9 @@ if __name__ == '__main__':
print
(
janus_request
()
.
polymer
())
print
(
"fgx"
)
#打印次卡-确认订单接口返回
print
(
janus_request
()
.
beauty_card_confirm
(
"10176"
,
1
,
1
,
0
))
print
(
janus_request
()
.
product_my_list
(
0
,
0
))
all_backend_api/janus_request.yaml
View file @
abf4910d
...
...
@@ -58,6 +58,17 @@ sku_info:
data
:
{}
json
:
{}
#商祥页-美券列表-我的美券点击-744版本及以后-新接口
product_coupon_my_list
:
method
:
get
url
:
/api/janus/product/coupon/my_list
params
:
start_num
:
${start_num}
tab_id
:
${tab_id}
data
:
{}
json
:
{}
isLogin
:
1
#品类聚合页面商品列表的
tag_service
:
method
:
GET
...
...
@@ -96,6 +107,20 @@ keyword_tip:
data
:
{}
json
:
{}
#次卡-确认订单
beauty_card_confirm
:
method
:
post
url
:
/api/janus/beauty_card/order/confirm
params
:
{}
data
:
sku_id
:
${sku_id}
number
:
${number}
bctraceid
:
"
"
use_bc_coupon
:
${use_bc_coupon}
bc_coupon_id
:
${bc_coupon_id}
json
:
{}
isLogin
:
1
#新版本我的美券
...
...
path_setting.py
View file @
abf4910d
...
...
@@ -245,6 +245,15 @@ GIFT_LIST_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hybrid_g
#商祥页-优惠券列表-领取
HYBRID_GET_GIFT_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hybrid_get_gift_request.yaml"
)
GET_GIFT_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_get_gift_data"
,
"get_gift_data.yaml"
)
#商祥页-美券列表-我的美券点击-744版本及以后-新接口
PRODUCT_COUPON_MY_LIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"product_coupon_my_list.yaml"
)
#商祥页-推荐商品列表
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"
)
#次卡-确认订单
BEAUTY_CARD_CONFIRM
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_confirm.yaml"
)
#捜索结果页-医生/医院tab
CONTENTV6_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
CONTENTV6
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"content_v6.yaml"
)
...
...
test_backend_case/hybrid_promotion_case/__init__.py
0 → 100644
View file @
abf4910d
test_backend_case/hybrid_promotion_case/test_related_service_data.py
0 → 100644
View file @
abf4910d
import
pytest
from
all_backend_api.hybrid_promotion_request
import
hybrid_promotion_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestTelatedServiceData
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
RELATED_SERVICE_DATA
)
related_service_data_case
,
related_service_data_data
=
get_ids
(
data
,
"related_service_data"
)
@pytest.mark.parametrize
(
"param"
,
related_service_data_data
,
ids
=
related_service_data_case
)
def
test_related_service_data
(
self
,
param
):
r
=
hybrid_promotion_request
()
.
related_service_data
(
param
[
"service_id"
],
param
[
"page"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_case/janus_case/test_beauty_card_confirm.py
0 → 100644
View file @
abf4910d
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
TestBeautyCardConfirm
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
BEAUTY_CARD_CONFIRM
)
beauty_card_confirm_case
,
beauty_card_confirm_data
=
get_ids
(
data
,
"beauty_card_confirm"
)
@pytest.mark.parametrize
(
"param"
,
beauty_card_confirm_data
,
ids
=
beauty_card_confirm_case
)
def
test_beauty_card_confirm
(
self
,
param
):
r
=
janus_request
()
.
beauty_card_confirm
(
param
[
"sku_id"
],
param
[
"number"
],
param
[
"use_bc_coupon"
],
param
[
"bc_coupon_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_case/janus_case/test_product_coupon_my_list.py
0 → 100644
View file @
abf4910d
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
TestProductCouponMyList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
PRODUCT_COUPON_MY_LIST
)
product_coupon_my_list_case
,
product_coupon_my_list_data
=
get_ids
(
data
,
"product_coupon_my_list"
)
@pytest.mark.parametrize
(
"param"
,
product_coupon_my_list_data
,
ids
=
product_coupon_my_list_case
)
def
test_product_coupon_my_list
(
self
,
param
):
r
=
janus_request
()
.
product_coupon_my_list
(
param
[
"start_num"
],
param
[
"tab_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_data/hybrid_promotion_data/__init__.py
0 → 100644
View file @
abf4910d
test_backend_data/hybrid_promotion_data/related_service_data.yaml
0 → 100644
View file @
abf4910d
related_service_data
:
-
case
:
"
商祥页-推荐商品列表-接口调用成功case"
service_id
:
"
5815040"
page
:
1
assert_error
:
0
\ No newline at end of file
test_backend_data/janus_data/beauty_card_confirm.yaml
0 → 100644
View file @
abf4910d
beauty_card_confirm
:
-
case
:
"
次卡-确认订单-接口调用成功case"
sku_id
:
"
10176"
number
:
1
use_bc_coupon
:
1
bc_coupon_id
:
0
assert_error
:
0
test_backend_data/janus_data/product_coupon_my_list.yaml
0 → 100644
View file @
abf4910d
product_coupon_my_list
:
-
case
:
"
我的美券列表(新)-校验接口返回成功case"
start_num
:
0
tab_id
:
0
assert_error
:
0
\ 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